Type Alias MongodbCacheAdapterSettings

MongodbCacheAdapterSettings: {
    collectionName?: string;
    collectionSettings?: CollectionOptions;
    database: Db;
    serde: ISerde<string>;
}

Configuration for MongodbCacheAdapter. Requires a MongoDB Db instance and a serde for serialising cache values to strings.

IMPORT_PATH: "@daiso-tech/core/cache/mongodb-cache-adapter"

Type declaration

  • OptionalcollectionName?: string

    Name of the MongoDB collection used to store cache entries.

    "cache"
    
  • OptionalcollectionSettings?: CollectionOptions

    Additional options passed when creating or accessing the MongoDB collection.

  • database: Db

    The MongoDB Db instance to store cache entries in.

  • serde: ISerde<string>

    Serde instance for serializing and deserializing cache values to and from strings.