I am using System.Runtime.Caching for memory cache, but I would like to have a filecache aswell. I am having some trouble, seeing how to do this.
Of course, I can create my own, simply method of doing this. Save to disc, get from disc if it exists. BUT, can I do something more clever, with System.Runtime.Caching? Get expiration on the items, as an example?
I don’t really see how to implement expiration, on my simple save-to-disc cache.
I am using System.Runtime.Caching for memory cache, but I would like to have a
Share
Serialization is the key with which you can achieve this sort Caching on the FileSystem. First of all you must be having some object to Cache on the FileSystem. Include the Expiration time factor in it to check for its expiry (can be implemented using Timer) then you just need to design those objects to support Serialization.
To understand more about Serialization use following references: