Skip to content

ensure lock is held while setting cache #5

@n1ywb

Description

@n1ywb

let v = await this._cache.set(key, this._cacheSetTransform(value), {

If you needed a really strong guarantee that the lock was in fact held while setting a redis cache value and the lock and cache redis servers were one and the same then you could use Lua to query the lock and set the cache value atomically.

I suppose at that point you may as well just store the lock and cache values under the same key

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions