Re: Persistent cache

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Persistent cache

Richard Heycock
Excerpts from Sean Cribbs's message of 2010-02-04 23:51:25 +1100:
> I asked Justin about this the other day (the TTL issue).  Unfortunately,
> Riak will ignore any Expires or Cache-Control headers you send.  That
> said, you could easily implement TTL in your application with
> X-Riak-Meta-* headers or as a map phase.

Hi Sean,

Sorry for the late response.

When you say the map phase do you mean that I could set up a garbage
collector that periodically searches for out-of-date fields and delete
them?

rgh

> Sean
>
> On 2/4/10 7:41 AM, Richard Heycock wrote:
> > I would love to use riak as a persistent cache with either a fixed size
> > or TTL. The only storage backend that appears to support this is the
> > in-memory one which kind of defeats the purpose! Are there any other
> > storage backends that support this?
> >
> > rgh
> >    
>
--
Richard Heycock

http://topikality.com

+61 (0) 410 646 369
[e]:  [hidden email]
[im]: [hidden email]

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Persistent cache

Sean Cribbs
Actually, I was just suggesting that you check the X-Riak-Meta-* header
in the map phase, and return an empty list if it has expired.  If you
want an idea of how I plan to do it in Ruby, look here:  
http://github.com/seancribbs/ripple/blob/cache/lib/riak/cache_store.rb

Sean

On 2/15/10 6:53 PM, Richard Heycock wrote:

> Excerpts from Sean Cribbs's message of 2010-02-04 23:51:25 +1100:
>    
>> I asked Justin about this the other day (the TTL issue).  Unfortunately,
>> Riak will ignore any Expires or Cache-Control headers you send.  That
>> said, you could easily implement TTL in your application with
>> X-Riak-Meta-* headers or as a map phase.
>>      
> Hi Sean,
>
> Sorry for the late response.
>
> When you say the map phase do you mean that I could set up a garbage
> collector that periodically searches for out-of-date fields and delete
> them?
>
> rgh
>
>    
>> Sean
>>
>> On 2/4/10 7:41 AM, Richard Heycock wrote:
>>      
>>> I would love to use riak as a persistent cache with either a fixed size
>>> or TTL. The only storage backend that appears to support this is the
>>> in-memory one which kind of defeats the purpose! Are there any other
>>> storage backends that support this?
>>>
>>> rgh
>>>
>>>        
>>      


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com