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.
파일 보기 프로젝트 열기: mono/flickr-sharp

공개 메소드들

메소드 설명
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