XyzLruCache<T>¶
Namespace: ThinkGeo.Core
public class XyzLruCache<T>
Type Parameters¶
T
Inheritance Object → XyzLruCache<T>
Properties¶
Capacity¶
public int Capacity { get; set; }
Property Value¶
Constructors¶
XyzLruCache(Int32)¶
public XyzLruCache(int capacity)
Parameters¶
capacity
Int32
Methods¶
Get(Int32, Int64, Int64)¶
Asynchronously gets a tile from the cache if it exists. If not found, returns default(T) (null for reference types).
public T Get(int zoom, long x, long y)
Parameters¶
zoom
Int32
x
Int64
y
Int64
Returns¶
T
Add(Int32, Int64, Int64, T)¶
Adds/updates the given content in the cache. Moves it to most recently used. If capacity is exceeded, removes the least recently used item.
public void Add(int zoom, long x, long y, T content)
Parameters¶
zoom
Int32
x
Int64
y
Int64
content
T
Remove(Int32, Int64, Int64)¶
Removes the specified tile from the cache, if it exists.
public bool Remove(int zoom, long x, long y)
Parameters¶
zoom
Int32
x
Int64
y
Int64
Returns¶
Clear()¶
public void Clear()