XyzLruCache<T>¶
Namespace: ThinkGeo.Core
public class XyzLruCache<T>
Type Parameters¶
T
Inheritance Object → XyzLruCache<T>
Constructors¶
XyzLruCache(Int32)¶
public XyzLruCache(int capacity)
Parameters¶
capacity
Int32
Methods¶
Get(Int32, Int32, Int32)¶
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, int x, int y)
Parameters¶
zoom
Int32
x
Int32
y
Int32
Returns¶
T
Add(Int32, Int32, Int32, 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, int x, int y, T content)
Parameters¶
zoom
Int32
x
Int32
y
Int32
content
T