C# Класс 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.
Наследование: ICache
Показать файл Открыть проект

Открытые методы

Метод Описание
Get ( string key ) : CachedData
PersistentCache ( string basePath ) : System
Put ( string key, System.DateTime timestamp, object instance ) : void
Remove ( string key ) : void

Приватные методы

Метод Описание
EscapeKey ( string key ) : string

Описание методов

Get() публичный метод

public Get ( string key ) : CachedData
key string
Результат CachedData

PersistentCache() публичный метод

public PersistentCache ( string basePath ) : System
basePath string
Результат System

Put() публичный метод

public Put ( string key, System.DateTime timestamp, object instance ) : void
key string
timestamp System.DateTime
instance object
Результат void

Remove() публичный метод

public Remove ( string key ) : void
key string
Результат void