C# Класс FlickrNet.PersistentCache

A threadsafe cache that is backed by disk storage. All public methods that read or write state must be protected by the lockFile. Private methods should not acquire the lockFile as it is not reentrant.
Показать файл Открыть проект

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

Метод Описание
Flush ( ) : void
Get ( string key, System.TimeSpan maxAge, bool removeIfExpired ) : ICacheItem
PersistentCache ( string filename, CacheItemPersister persister, long maxSize ) : System
Shrink ( long size ) : void
ToArray ( Type valueType ) : ICacheItem[]

Return all items in the cache. Works similarly to ArrayList.ToArray(Type).

this ( string key ) : ICacheItem

Gets or sets cache values.

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

Метод Описание
Expired ( System.DateTime test, System.TimeSpan age ) : bool
InternalGet ( string key ) : ICacheItem
InternalGetAll ( Type valueType, string &keys, Array &values ) : void
InternalSet ( string key, ICacheItem value ) : ICacheItem
Load ( Stream s ) : Hashtable
Persist ( ) : void
Refresh ( ) : void
RemoveKey ( string key ) : ICacheItem
Store ( Stream s, Hashtable table ) : void

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

Flush() публичный Метод

public Flush ( ) : void
Результат void

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

public Get ( string key, System.TimeSpan maxAge, bool removeIfExpired ) : ICacheItem
key string
maxAge System.TimeSpan
removeIfExpired bool
Результат ICacheItem

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

public PersistentCache ( string filename, CacheItemPersister persister, long maxSize ) : System
filename string
persister CacheItemPersister
maxSize long
Результат System

Shrink() публичный Метод

public Shrink ( long size ) : void
size long
Результат void

ToArray() публичный Метод

Return all items in the cache. Works similarly to ArrayList.ToArray(Type).
public ToArray ( Type valueType ) : ICacheItem[]
valueType System.Type
Результат ICacheItem[]

this() публичный Метод

Gets or sets cache values.
public this ( string key ) : ICacheItem
key string
Результат ICacheItem