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

scalacache.Entry.scala Maven / Gradle / Ivy

package scalacache

import org.joda.time.DateTime

/**
 * A cache entry with an optional expiry time
 */
case class Entry[+A](value: A, expiresAt: Option[DateTime]) {

  /**
   * Has the entry expired yet?
   */
  def isExpired: Boolean = expiresAt.exists(_.isBeforeNow)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy