Cache to store persistent application's variables

Discussion in 'ASP .Net' started by NWx, Feb 19, 2004.

  1. NWx

    NWx Guest

    Hi,

    Is Cache appropriate to store persistent variables used across the
    application? What I want is to store UserID for currently logged user,
    SessionID (my own SessionID, which keep track of datetime for login and
    logout as well as other info, like Client IP , etc)

    My objects I want store to cache are not set-up to expire.

    Or should I store them better in Session storage?

    Regards
     
    NWx, Feb 19, 2004
    #1
    1. Advertising

  2. Small user specific values are probably better stored in the session object.
    I would use the cache for more broader used values (application wide). In
    particular I believe that when storing in the cache you should be always
    prepared for cache misses (under low memory condition, I believe even
    "permanent" items may be destroyed. Can someone confirm this ?

    In any case you may want to provide a class that store/retrieve these
    values, this way you'll be easily able to change the underlying storage for
    these values (plus type safety, intellisence for user settings etc...)

    Patrice

    --

    "NWx" <> a écrit dans le message de
    news:%...
    > Hi,
    >
    > Is Cache appropriate to store persistent variables used across the
    > application? What I want is to store UserID for currently logged user,
    > SessionID (my own SessionID, which keep track of datetime for login and
    > logout as well as other info, like Client IP , etc)
    >
    > My objects I want store to cache are not set-up to expire.
    >
    > Or should I store them better in Session storage?
    >
    > Regards
    >
    >
     
    Patrice Scribe, Feb 19, 2004
    #2
    1. Advertising

  3. NWx

    NWx Guest

    Hi,

    Your suggestion about packing saving / restoring to a class is great. I'll
    use it, thnaks.

    Regards

    "Patrice Scribe" <> wrote in message
    news:...
    > Small user specific values are probably better stored in the session

    object.
    > I would use the cache for more broader used values (application wide). In
    > particular I believe that when storing in the cache you should be always
    > prepared for cache misses (under low memory condition, I believe even
    > "permanent" items may be destroyed. Can someone confirm this ?
    >
    > In any case you may want to provide a class that store/retrieve these
    > values, this way you'll be easily able to change the underlying storage

    for
    > these values (plus type safety, intellisence for user settings etc...)
    >
    > Patrice
    >
    > --
    >
    > "NWx" <> a écrit dans le message de
    > news:%...
    > > Hi,
    > >
    > > Is Cache appropriate to store persistent variables used across the
    > > application? What I want is to store UserID for currently logged user,
    > > SessionID (my own SessionID, which keep track of datetime for login and
    > > logout as well as other info, like Client IP , etc)
    > >
    > > My objects I want store to cache are not set-up to expire.
    > >
    > > Or should I store them better in Session storage?
    > >
    > > Regards
    > >
    > >

    >
     
    NWx, Feb 19, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan

    Non persistent page cache

    Ryan, Jan 21, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    416
    Paul Glavich
    Jan 21, 2004
  2. =?Utf-8?B?SGFyYWxk?=

    Persistent cache contents after deletion

    =?Utf-8?B?SGFyYWxk?=, Feb 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    288
    =?Utf-8?B?SGFyYWxk?=
    Feb 19, 2004
  3. gk
    Replies:
    7
    Views:
    976
    Tom Anderson
    Oct 12, 2010
  4. Bob Hutchison

    Looking for a Fast Persistent Store

    Bob Hutchison, Aug 9, 2006, in forum: Ruby
    Replies:
    43
    Views:
    427
  5. Josef Wolf

    How to store/load persistent data?

    Josef Wolf, Sep 4, 2006, in forum: Ruby
    Replies:
    0
    Views:
    148
    Josef Wolf
    Sep 4, 2006
Loading...

Share This Page