SPCache Members

Include Protected Members
Include Inherited Members

Allows access to allocated caches.

The SPCache type exposes the following members.

Properties

  Name Description
Public property AllocatedBytes Gets the total bytes allocated by all caches.
Public propertyStatic member Cache Gets the current SPCache object.
Public property Count Gets the number of currently active caches.
Public property HitRatio Gets the current cache hit ratio, across all caches.
Public property TotalCacheHits Gets the number of cache hits across all caches.
Public property TotalReadAttempts Gets the number of read attempts across all caches.
Public property UsedBytes Gets the number of bytes in use across all caches.

Top

Methods

  Name Description
Public method Clear Removes all objects from the cache specified by the type name.
Public method CreateMossObjectCache(String, Byte, TimeSpan, UInt64) Creates a new cache that contains objects with the specified type name and that has the specified priority, retention period, and maximum size.
Public method CreateMossObjectCache(String, Byte, TimeSpan, UInt64, Boolean) Creates a new cache that contains objects with the specified type name and that has the specified priority, retention period, maximum size and expiration policy.
Public method Delete(String, String) Deletes an item with the specified string identifier from the cache with the specified object type.
Public method Delete(String, String, Boolean) Deletes an item with the specified string identifier from the cache with the specified object type.
Public method DeleteByIndexedValue Deletes from the cache with the specified object type all objects that match the indexed key-value pair.
Public method DeleteExpired Removes from all caches all objects whose expiration dates are in the past.
Public method Dispose Releases all of the current memory associated with all caches.
Public method Enum Returns all of the objects in the cache with the specified object type name.
Public method EnumObjectList Returns a list of all object identifiers for all objects in the cache with the specified object type.
Public method Get Returns an object with the specified identifier from the cache wit the specified object type.
Public method GetByIndex Returns a List of objects with the specified indexed key-value pairs from the cache with the specified object type.
Public method GetCacheObject Returns an object with the specified identifier from the cache with the specified object type.
Public method GetItemCount Returns the number of objects in the cache with the specified object type.
Public method GetTree Returns a List of cache objects under a specified parent object in a cache with the specified object type.
Public method NotifyItemRemoved Raises the ItemRemoved event and passes event-specific data to the associated event handler.
Public method ObjectCacheExists Returns a Boolean value indicating whether an object cache with the specified object type exists.
Public method Put(String, SPCachedObject) Writes the specified object to the cache with the specified object type.
Public method Put(String, []) Writes the specified array of objects to the cache with the specified object type.
Public method ReleaseMossObjectCache Deletes the object cache with the specified object type.
Public method Trim(DateTime) Trims all caches of all objects that have not been accessed since the specified DateTime.
Public method Trim(String, DateTime) Trims the cache with the specified object type of all items that have not been accessed since the specified DateTime.

Top

Events

  Name Description
Public event ItemRemoved Occurs when an object is removed from the current cache.

Top

See Also

Reference

SPCache Class

Microsoft.Office.Server.ObjectCache Namespace