Skip to content

new Cache(); #536

@jakearchibald

Description

@jakearchibald

To keep @domenic happy (well, and others) the cache should have a constructor.

var cache = new Cache();

It should behave similar to:

var cache = await caches.open(SECRET_TOKEN);
await caches.delete(SECRET_TOKEN);

You can add items to it, remove items from it, everything you can do with a cache, the implementation will likely be disk-backed. Once it's GC'd, it's associated items should be effectively deleted.

We can look into caches.set(name, cache) and the problems that come with it later.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions