Liftweb: Implement cache

In this blog post, I will explain how to integrate cache on server.
Liftweb Framework provide nice way to implement cache to store data(objects) on server so all user can access that data. Lift uses the LRU Cache wrapping org.apache.commons.collections.map.LRUMap

Create Object for handling cache operations like create,get,update and delete the data from in-memory cache.
LRUinMemoryCache.scala

Create and store the data in in-memory cache at the deployment time:
Boot.scala

Now we are accessing in-memory cache

Leave a Reply

%d bloggers like this: