|
|
|
|
Re: Cache - how to dispose it? [message #1828469 is a reply to message #1828413] |
Wed, 10 June 2020 10:57 |
Darth Bolek Messages: 25 Registered: August 2019 |
Junior Member |
|
|
Yes, it does help. Thank you for clarification.
I am researching possibilities for caching user/session related data. For example when user logs in, preferences specific for that user are being cached in one place from wherever they are (DB, LDAP, ...) By preferences I mean: roles/permissions, timezone, locale, theme, view specific properties (columns, order), etc. And after log out / session invalidate all of this data needs to be garbage collected.
So, what I am thinking right now is global (CRS registered) ICache<String, UserData> = (user name, user data), each authenticated user(session?) will get its own entry. UserData class will keep all user specific caches (there will be more than one). From what I can tell I should be able to use ICache (BasicCache) without registering it - that is for caches inside UserData class. This way I won't have to worry about unregistering them.
Things to think about:
How to treat user logging in multiple times from different browsers? per user or per session? - the longer I think about it the more I am leaning towards per user option - but that means it will have to be thread safe...
Subclassing/extending is always an option, but first I would like to have good understanding of what I am going to modify.
|
|
|
Powered by
FUDForum. Page generated in 0.03010 seconds