@Override
    public void deleteOneEntryUsingCachePolicy() {
        IndexEventHolder indexEventHolder = (IndexEventHolder) stateHolder.getState().getEventHolder();
        Set<Object> keys = indexEventHolder.getAllPrimaryKeyValues();
        long minTimestamp = Long.MAX_VALUE;
        Object keyOfMinTimestamp = null;
        for (Object key : keys) {
            Object[] data = indexEventHolder.getEvent(key).getOutputData();
            long timestamp = (long) data[cachePolicyAttributePosition];
            if (timestamp < minTimestamp) {
                minTimestamp = timestamp;
                keyOfMinTimestamp = key;
            }
        }
        indexEventHolder.deleteEvent(keyOfMinTimestamp);
    }
cache table with LRU entry removal
modules/siddhi-core/src/main/java/io/siddhi/core/table/CacheTableLRU.java