Search in sources :

Example 1 with CachingParams

use of org.apache.cassandra.schema.CachingParams in project cassandra by apache.

the class SSTableReader method cacheKey.

public void cacheKey(DecoratedKey key, RowIndexEntry info) {
    CachingParams caching = metadata().params.caching;
    if (!caching.cacheKeys() || keyCache == null || keyCache.getCapacity() == 0)
        return;
    KeyCacheKey cacheKey = new KeyCacheKey(metadata(), descriptor, key.getKey());
    logger.trace("Adding cache entry for {} -> {}", cacheKey, info);
    keyCache.put(cacheKey, info);
}
Also used : CachingParams(org.apache.cassandra.schema.CachingParams) KeyCacheKey(org.apache.cassandra.cache.KeyCacheKey)

Aggregations

KeyCacheKey (org.apache.cassandra.cache.KeyCacheKey)1 CachingParams (org.apache.cassandra.schema.CachingParams)1