CacheFactoryGetCache Method

ScaleOut Software NamedCache API
Create a cache using the default application id.

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

public static NamedCache GetCache()

Return Value

Type: NamedCache
Return instance of NamedCache.

This GetCache overload causes the currently executing application to be a potential recipient of StateServer event notifications for objects in the application's default namespace. To receive notifications, you must also register a handler for the ObjectExpired event. Other GetCache overloads allow for finer-grained control over event handling for particular named caches.

If code is executing in an AppDomain initialized by ASP.NET, the web app's default cache will based on the name of its AppDomain. This ensures that caches will not be inadvertently shared across web applications. An ASP.NET client can also register with the SOSS Server for its default cache's event notifications, but applications will only receive those notifications if an ObjectExpired handler is established.

Applications running outside of ASP.NET will use a global default cache.

See Also