package org.gcube.datacatalogue.common.AAA_UNNEEDED; /** * Utility functions for caches * @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it) */ public class CacheUtilities { /** * Check if the bean expired * @param beanTimestamp * @param ttl * @return if expired, otherwise */ public static boolean expired(long beanTimestamp, long ttl){ long currentTime = System.currentTimeMillis(); if((beanTimestamp + ttl) <= currentTime) return true; else return false; } }