NamedCacheDefaultCreatePolicy Property

ScaleOut Software NamedCache API

Namespace:  Soss.Client
Assembly:  soss_namedcache (in soss_namedcache.dll) Version:

public CreatePolicy DefaultCreatePolicy { get; set; }

Property Value

Type: CreatePolicy

When a NamedCache instance is created, objects added to the cache via Add(CachedObjectId, Object) and ItemCachedObjectId will have an infinite timeout and a sliding expiration policy. Also, objects will be subject to reclamation under low-memory circumstances (if reclamation is enabled in the server), and they will eligible for GeoServer replication to a remote store. New defaults can be established by setting the DefaultCreatePolicy property to a new CreatePolicy instance.

Policies set by the DefaultCreatePolicy property can be overridden on an object-by-object basis by adding those objects to the cache via the Insert(String, Object, CreatePolicy, Boolean, Boolean) method.

Objects added to the cache with a PreemptionPriority of Normal will only be removed under low memory situations if LRU functionality is enabled in StateServer. Edit the soss_params.txt file in the StateServer installation directory to enable this feature: the lru_threshold parameter should be set to a percentage of the max_memory parameter. Eligible objects will be deleted using a least recently used algorithm once memory usage has passed the threshold.

See Also