Welcome Guest, Not a member yet? Register   Sign In
Auth, sessions, fetching user data
#2

[eluser]WanWizard[/eluser]
I have a last_updated timestamp in all my records (I use Datamapper, which automatically updates this column on save). This makes it easy to check if something has changed when I read a record.
I also use Phil Sturgeon's caching library, to cache indivudual query results. When a user or permission record is updated, the cache file is deleted.

I store only the key information in the session. On every page load, I load the cached user data, and if not present I call the model that fetches all data (and repopulates the cache).


Messages In This Thread
Auth, sessions, fetching user data - by El Forum - 11-27-2010, 04:07 AM
Auth, sessions, fetching user data - by El Forum - 11-27-2010, 04:56 AM
Auth, sessions, fetching user data - by El Forum - 11-27-2010, 05:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB