RasterImageCache¶
Namespace: ThinkGeo.Core
Holds decoded rasters so that sources share one copy instead of each keeping its own.
public static class RasterImageCache
Inheritance object → RasterImageCache
Remarks:
A map asks the same raster for a dozen or more tiles per redraw, and again on every pan, so decoding once and cropping from memory is far cheaper than decoding per tile. Left to itself that grows without limit - every open layer holding its own image - which is what this bounds. Two layers reading the same file share a single decode.
Eviction is least-recently-used and skips anything currently being read, so the total can briefly exceed RasterImageCache.MaximumBytes when everything held is in use.
Properties¶
MaximumBytes¶
Gets or sets the total decoded bytes to hold before evicting. Defaults to 1 GB in a 64-bit process and 192 MB in a 32-bit one.
public static long MaximumBytes { get; set; }
Property Value¶
Remarks:
Lowering this evicts straight away, as far as entries not currently being read allow.
CurrentBytes¶
Gets the decoded bytes currently held.
public static long CurrentBytes { get; }
Property Value¶
Count¶
Gets the number of decoded images currently held.
public static int Count { get; }
Property Value¶
Methods¶
Clear()¶
Releases everything not currently being read.
public static void Clear()
Returns¶
A(string)¶
internal static string A(string )
Parameters¶
`` string
Returns¶
A(long)¶
internal static bool A(long )
Parameters¶
`` long
Returns¶
A(string, Func<GeoImage>)¶
internal static bC A(string , Func<GeoImage> )
Parameters¶
`` string
Returns¶
bC
a(string)¶
internal static void a(string )
Parameters¶
`` string
Returns¶
A(A)¶
internal static void A(A )
Parameters¶
`A`