C# Class Alexandria.Client.Infrastructure.PersistentCache

Implement a trivial persistent cache. Any key is written to a file on disk. This will _not_ scale properly when the number of keys in the cache grows over several thousands, but it is perfectly fine for smaller quanitites of data.
Inheritance: ICache
Afficher le fichier Open project: ayende/Alexandria

Méthodes publiques

Méthode Description
Get ( string key ) : CachedData
PersistentCache ( string basePath ) : System
Put ( string key, System.DateTime timestamp, object instance ) : void
Remove ( string key ) : void

Private Methods

Méthode Description
EscapeKey ( string key ) : string

Method Details

Get() public méthode

public Get ( string key ) : CachedData
key string
Résultat CachedData

PersistentCache() public méthode

public PersistentCache ( string basePath ) : System
basePath string
Résultat System

Put() public méthode

public Put ( string key, System.DateTime timestamp, object instance ) : void
key string
timestamp System.DateTime
instance object
Résultat void

Remove() public méthode

public Remove ( string key ) : void
key string
Résultat void