All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jn.agileway.springboot.redis.SimpleCache Maven / Gradle / Ivy

package com.jn.agileway.springboot.redis;

import com.jn.langx.cache.AbstractCache;
import com.jn.langx.cache.Entry;
import com.jn.langx.cache.RemoveCause;

import java.util.List;

/**
 * 不过期的缓存
 * @param 
 * @param 
 */
public class SimpleCache extends AbstractCache {

    public SimpleCache(){
        this(Integer.MAX_VALUE, Long.MAX_VALUE);
    }

    protected SimpleCache(int maxCapacity, long evictExpiredInterval) {
        super(maxCapacity, evictExpiredInterval, null);
    }


    @Override
    protected void addToCache(Entry entry) {
        // NOOP
    }

    @Override
    protected void beforeRecomputeExpireTimeOnRead(Entry entry) {
        // NOOP
    }

    @Override
    protected void afterRecomputeExpireTimeOnRead(Entry entry) {
        // NOOP
    }

    @Override
    protected void removeFromCache(Entry entry, RemoveCause removeCause) {
        // NOOP
    }

    @Override
    protected void beforeRead(Entry entry) {
        // NOOP
    }

    @Override
    protected void afterRead(Entry entry) {
        // NOOP
    }

    @Override
    protected List forceEvict(int count) {
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy