package com.tzld.piaoquan.recommend.server.framework.recaller.provider;


import com.google.common.base.Optional;
import lombok.Data;

@Data
public class CacheEntry<T> {
    private String itemId; // itemId
    private Optional<T> item;
    private Long expireTime; // 静态特征失效时间
    private Long dynamicFeatureExpireTime; // 动态特征失效时间

    public CacheEntry(String itemId,
                      Long expireTime,
                      Long dynamicFeatureExpireTime,
                      Optional<T> item) {
        this.itemId = itemId;
        this.expireTime = expireTime;
        this.dynamicFeatureExpireTime = dynamicFeatureExpireTime;
        this.item = item;
    }

}
