-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Multiple caches #775
Comments
If you look through the milestone 1.0 issues, you'll see that the plan for v1 is to pass the cache instance, just as you've done in your example. But, for the 0.x releases, you might need to use the config thing to define the caches, or just make sure to use different arguments to namespace the caches. |
I suppose you are talking about this caches.set_config({
'default': {
'cache': "aiocache.SimpleMemoryCache",
'serializer': {
'class': "aiocache.serializers.StringSerializer"
}
},
'redis_alt': {
'cache': "aiocache.RedisCache",
"host": "127.0.0.1",
'port': 6379,
"socket_connect_timeout": 1,
'serializer': {
'class': "aiocache.serializers.PickleSerializer"
},
'plugins': [
{'class': "aiocache.plugins.HitMissRatioPlugin"},
{'class': "aiocache.plugins.TimingPlugin"}
]
}
}) But how would you reference individual ones in decorator then? I don't want to do below later on except clear(). Also I am not sure if I have to create a cache first.
Could you please clarify a bit more? |
Appears to be an We seem to be missing a reference section in the docs... |
In cachetools, we can create multiple cache instance like below
I couldn't find a way to replicate the above code using aiocache?
The text was updated successfully, but these errors were encountered: