## org.apache.cassandra.cache
Interface ICache<K,V>

All Known Implementing Classes:
  ConcurrentLinkedHashCache, SerializingCache

    public interface ICache<K,V>

This is similar to the Map interface, but requires maintaining a given capacity and does not require put or remove to return values, which lets SerializingCache be more efficient by avoiding deserialize except on get.

Method Summary
`int` `capacity()`
`void` `clear()`
`V` `get(K key)`
`java.util.Set<K>` `hotKeySet(int n)`
`boolean` `isPutCopying()`
`java.util.Set<K>` `keySet()`
`void` `put(K key, V value)`
`void` `remove(K key)`
`void` `setCapacity(int capacity)`
`int` `size()`

Method Detail

### capacity

    int capacity()

### setCapacity

    void setCapacity(int capacity)

### put

    void put(K key,
             V value)

### get

    V get(K key)

### remove

    void remove(K key)

### size

    int size()

### clear

    void clear()

### keySet

    java.util.Set<K> keySet()

### hotKeySet

    java.util.Set<K> hotKeySet(int n)

### isPutCopying

    boolean isPutCopying()

  Returns:
    true if the cache implementation inherently copies the cached values; otherwise, the caller should copy manually before caching shared values like Thrift ByteBuffers.

Copyright © 2012 The Apache Software Foundation