>
> >>When it comes to caching the modern approach is not to remove items, 
> but to simply let them expire.  Deleting is such an expensive operation.   
> >>That is why it is discouraged in memcached.  Instead you build a 
> token into the key that changes when you need to flush. 
> >>Example key:  clientid + clienttoken + someactualreference 
> >>so when you need to expire the content for the client, you 
> simply change/increment the clienttoken, thus invalidating all the keys 
> which 
> >>effectively empties the cache naturally.  It takes a little bit of 
> a mind shift to see this, but trust me, it will actually make your caching 
> >>management infinitely easier than having to remember to manually 
> flush specific groups. 
> >>So in other words, an effective caching management should NEVER have 
> to reach for CacheRemove/CacheRemoveAll.  If you find yourself reaching for 
> >>those functions then rethink.  
>

Hi Alan,

this concept is very interesting but if I understood it correctly

 - applies only to cache strcutures where the cache data is separated on 
several clients?
 - requires the clienttoken management for every client?
 - invalidates all keys for one client, even if only one key data was 
changed?

So is it really more efficient to invalidate several client keys (by 
incrementing the clienttoken) instead of just removing one key? All 
invalidated keys would need to be rebuild.

-Harry

-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

Reply via email to