Query Indexes
NCache Query Indexing lets you search cached data efficiently by creating indexes on searchable attributes. Instead of scanning the entire cache, NCache uses these indexes to execute queries against the indexed data. Query indexes are required when cached data needs to be searched by attributes rather than cache keys. In NCache, these indexes can be configured for strongly typed application objects as well as JSON documents stored in the cache.
NCache supports query indexing for the following:
Class Attributes: Class attributes can be indexed for strongly typed application objects stored in the cache. With this option, selected class attributes or properties are made searchable so they can be used in queries. This option can be used when cached data is based on application classes and queries need to be executed against their attributes or properties.
JSON Attributes: JSON attributes can be indexed for JSON documents stored in the cache. With this option, selected attributes inside a JSON document are made searchable so they can be used in queries. This option can be used when applications store data in JSON format or when cached data is shared across different platforms and clients. JSON attribute indexing requires class mapping information, such as the
Index_Classattribute, so NCache can associate JSON attributes with a queryable type.
In This Section
Class Attributes
Discusses how to configure indexes on class attributes or properties for strongly typed objects stored in the cache.
JSON Attributes
Discusses how to configure indexes on selected JSON attributes for JSON documents stored in the cache.