Gemstone Data Library
Show/Hide TOC

# SecureTableOperations T PrimaryKeyCache Property

Gets or sets primary key cache.

## Definition

Namespace: Gemstone.Data.Model
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.163 -- Release Build+b7c062313779c243eb4689aaf08bfd5bae61c6da
C#
View Source Request Example

    public DataTable? PrimaryKeyCache { get; }

VB
View Source Request Example

    Public ReadOnly Property PrimaryKeyCache As DataTable
    	Get

C++
View Source Request Example

    public:
    property DataTable^ PrimaryKeyCache {
    	DataTable^ get ();
    }

JavaScript
View Source Request Example

    function get_PrimaryKeyCache();

#### Property Value

DataTable

## Remarks

The QueryRecords(ClaimsPrincipal, String, Boolean, Int32, Int32, IRecordFilter) overloads that include paging parameters cache the sorted and filtered primary keys of queried records between calls so that paging is fast and efficient. Since the primary keys are cached, an instance of the TableOperationsT should exist per user session when using query functions that support pagination. In web based implementations, the primary cache should be stored with user session state data and then restored between instances of the TableOperationsT that are created along with a connection that is opened per page.

The function ClearPrimaryKeyCache should be called to manually clear cache when table contents are known to have changed. Note that calls to any DeleteRecord(ClaimsPrincipal, RecordRestriction, NullableBoolean) overload will automatically clear any existing primary key cache.

Primary keys values are stored in data table without interpretation, i.e., in their raw form as queried from the database. Primary key data in cache will be encrypted for models with primary key fields that are marked with the EncryptDataAttribute

## See Also

#### Reference

SecureTableOperationsT Class
Gemstone.Data.Model Namespace