Lift : key value cache

58 views
Skip to first unread message

Roch Delsalle

unread,
Oct 5, 2012, 1:51:26 PM10/5/12
to lif...@googlegroups.com
Hi,

I would like to know whats the easiest way to implement a key value cache within a Lift application ?
For instance if I need to cache the result of a heavy computation in the servers memory or on a remote Memcache server.

Thanks,

Roch 

Tyler Weir

unread,
Oct 5, 2012, 2:56:07 PM10/5/12
to lif...@googlegroups.com
It's hard to know the best solution given the lack of info, but scalaz's Memo[1] may be what you need.

pelagic

unread,
Oct 5, 2012, 3:01:00 PM10/5/12
to lif...@googlegroups.com
I agree with Tyler that more info in needed. could be as easy as a hashmap.

Roch Delsalle

unread,
Oct 8, 2012, 4:48:24 AM10/8/12
to lif...@googlegroups.com
Thank you Tyler I'm going to check it out,
Well basically I have a heavy MongoDB/Rogue query and I want to cache it because I call it very often.
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 

David Pollak

unread,
Oct 8, 2012, 10:53:18 AM10/8/12
to lif...@googlegroups.com
On Mon, Oct 8, 2012 at 1:48 AM, Roch Delsalle <rdel...@gmail.com> wrote:
Thank you Tyler I'm going to check it out,
Well basically I have a heavy MongoDB/Rogue query and I want to cache it because I call it very often.


I recommend against caching a MongoDB query. MongoDB is going to be a lot better at caching a result that you are. 

On Friday, October 5, 2012 at 9:01 PM, pelagic wrote:

I agree with Tyler that more info in needed. could be as easy as a hashmap.

On Friday, October 5, 2012 11:56:07 AM UTC-7, Tyler Weir wrote:
It's hard to know the best solution given the lack of info, but scalaz's Memo[1] may be what you need.


On Friday, October 5, 2012 1:51:50 PM UTC-4, Roch Delsalle wrote:
Hi,

I would like to know whats the easiest way to implement a key value cache within a Lift application ?
For instance if I need to cache the result of a heavy computation in the servers memory or on a remote Memcache server.

Thanks,

Roch 

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 



--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net


Reply all
Reply to author
Forward
0 new messages