Request

Response

    Storage class

    File based cache.

    public class Storage : IStorage
    

    Public Members

    namedescription
    Storage() Initializes a new instance of the Storage class. It will initialize with the default path (appdata+Connector) and load all the cache from folders.
    Storage(…) Initializes a new instance of the Storage class. It will initialize with the parameter path and load all the cache from folders. (2 constructors)
    BaseDirectory { get; protected set; } Gets or sets base location for cache.
    virtual Add(…) It will add cache to collection. (2 methods)
    virtual Get<T>(…) It will return the cache as per type. (2 methods)
    virtual Remove(…) It will remove the cache from collection by specified key. (2 methods)
    virtual Save(…) Commit a single cache entry to disk: writes the value most recently added under key, or deletes the on-disk entry when the key was passed to Remove. Entries that are added but never saved stay in memory only. Does nothing when the key is not present.

    Protected Members

    namedescription
    virtual Collection { get; set; } Gets or sets collection of cache.
    virtual WriteEntry(…) Writes one entry to "<group>/<key>.gz", committing through a temp file so a failed write cannot leave a partial file in place of the previous one. Override to change how an entry is serialized; callers are already serialized per key.
    class StorageDetails Cache details.

    See Also