|
-
Jan 4th, 2013, 03:53 AM
#1
Thread Starter
Junior Member
Read-Through Cache; Unable to specify a timeout…?
I have implemented a Read-Through cache using AppFabric (Windows Server) by extending DataCacheStoreProvider.
Once the data has been retrieved from the datasource, a DataCacheItem is created for return by calling this static method:
Code:
DataCacheItemFactory.GetCacheItem(Key, CacheName, DataObject, Tags)
My problem is that there is no opportunity to specify the timeout (as in expiry) for the cached item.
This means that to implement a read-through cache, you are forced to always use the default item timeout for every cached item, which is rubbish.
Is this true, or is there some way of setting the timeout when implementing a read-though cache design-pattern using AppFabric?
Thanks
EDIT: For reference, the process I am implementing is described in more depth here.
EDIT: The only way that I can see to achieve this is to define a separate named cache (in order to provide differing default lifespan values) for each distinct timeout you need to use, which is ridiculous and completely outweighs the advantages of adopting this design pattern in the first place.
Last edited by Crane101; Jan 4th, 2013 at 05:41 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|