As a novice, I would welcome the community's insights in to how I should
approach caching selects in a multi-tenant application.
For a single user, my controller had:
def list():
adults = cache.ram('adults',
lambda:db(db.adult.id>0).select(),3600)
return dict(adults=adults)
For a single tenant this works fine, but for multi tenants all users access
the same cache 'adults'. This therefore exposes the cached data to
everyone.
The simple solution is to abandon caching altogether, but I am wondering if
it is feasible to have a different cache for each tenant (I have <10
tenants)?
I have no idea how to implement this, so would appreciate some pointers.
Thanks,
Andy
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.