Expiring

pekko.contrib.persistence.mongodb.MongoCollectionCache.Expiring
case class Expiring[C](expireAfterWrite: Duration) extends MongoCollectionCache[C]

Naive implementation of a cache whose entries expire after a period of time. Memory consumption is not bounded.

Type parameters

C

Collection type.

Value parameters

expireAfterWrite

Duration that a cached collection remains valid.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def getOrElseCreate(collectionName: String, collectionCreator: String => C): C

Retrieve a collection from the cache if it exists or otherwise create it using an IDEMPOTENT procedure.

Retrieve a collection from the cache if it exists or otherwise create it using an IDEMPOTENT procedure.

Value parameters

collectionCreator

Creator of the collection. Must be idempotent.

collectionName

Name of the collection.

Attributes

Definition Classes
override def invalidate(collectionName: String): Unit

Attributes

Definition Classes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product