[CACHE] detect removed object

Discussion in 'ASP .Net' started by teo, Dec 7, 2006.

  1. teo

    teo Guest

    I insert few objects in the Cache
    and
    use a callback to be notified of their removal

    in this way:

    Page.Cache.Insert("MyObj1",myDataTable1,.........., AddressOf
    OnItemRemoval)

    Page.Cache.Insert("MyObj2",myDataTable2,.........., AddressOf
    OnItemRemoval)

    Page.Cache.Insert("MyObj3",myDataTable3,.........., AddressOf
    OnItemRemoval)


    Is there a way to detect in the 'OnItemRemoval' sub
    which object has been removed?
    teo, Dec 7, 2006
    #1
    1. Advertising

  2. create a dummy file and invalida the cache when a file is changed.
    When updating the source of the cache update the file as well

    --
    Regards
    Sheng Jiang
    Microsoft MVP in Visual C++
    "teo" <> wrote in message
    news:...
    >I insert few objects in the Cache
    > and
    > use a callback to be notified of their removal
    >
    > in this way:
    >
    > Page.Cache.Insert("MyObj1",myDataTable1,.........., AddressOf
    > OnItemRemoval)
    >
    > Page.Cache.Insert("MyObj2",myDataTable2,.........., AddressOf
    > OnItemRemoval)
    >
    > Page.Cache.Insert("MyObj3",myDataTable3,.........., AddressOf
    > OnItemRemoval)
    >
    >
    > Is there a way to detect in the 'OnItemRemoval' sub
    > which object has been removed?
    Sheng Jiang[MVP], Dec 7, 2006
    #2
    1. Advertising

  3. teo

    teo Guest

    now

    on my pc, in the developing enviroment, the callback is
    always fired and the reinsertion always happens

    but

    on the web site
    it is not always fired
    (and obviously no reinsertion can happen)
    or
    it is fired, but only few object (I have 5 object ) are reinserted
    and in example when I try
    myDataView = Me.Cache("myCachedDataViev")
    sometimes I get Nothing

    so there is an odd problem with
    my aspx page,the IIS 6, timing, Win2000 (or 2003)...



    notes:

    no traffic during these tests (it's night)
    no heavy elaborations performed

    my callback routine is on the .aspx page
    and not in a module, could be this the problem?
    teo, Dec 8, 2006
    #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. Jeff Nokes

    Cache::Cache Stale Segments

    Jeff Nokes, Sep 30, 2003, in forum: Perl
    Replies:
    0
    Views:
    549
    Jeff Nokes
    Sep 30, 2003
  2. Ryan Moore

    detect cache settings

    Ryan Moore, Feb 3, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    354
    Ryan Moore
    Feb 3, 2004
  3. Replies:
    2
    Views:
    85
  4. Replies:
    19
    Views:
    177
    Randy Webb
    Jul 4, 2006
  5. SleeplessAndy

    .js file removed from cache before expiry date

    SleeplessAndy, Jun 4, 2010, in forum: Javascript
    Replies:
    6
    Views:
    299
    Dr J R Stockton
    Jun 5, 2010
Loading...

Share This Page