Skip to content

Create Multiple caches #775

Open
Open
@Sagaryal

Description

@Sagaryal

In cachetools, we can create multiple cache instance like below

from cachetools import TTLCache, cached

A_cache = TTLCache(maxsize=100, ttl=60)
B_cache = TTLCache(maxsize=100, ttl=60)

@cached(cache=A_cache)
def a():
    # some code

@cached(cache=B_cache)
def b():
    # some code

A_cache.clear()
B_cache.clear()

I couldn't find a way to replicate the above code using aiocache?

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