Cache retrieving old data RRS feed

  • Question

  • User1763535166 posted

    I am using cache for state management.

    To add datatable to cache i using using the below code

    Cache.Insert("key", datatable_Temp, null, System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(30);

    And to remove datatable from cache i am using below code


    I am storing the data database in cache and using this cached data for binding gridview.

    I am filtering the datatable as per my search criteria and removing the old data from cache and inserting the filtered datatable in cahce again.

    But on clicking any button in gridview, during postback the old cached data which was removed from memory is getting binded to gridview.

    Any idea why i am getting cached datatable which is being removed from the cache and not the latest cached datatable.

    Tuesday, October 23, 2012 4:57 AM

All replies

  • User-735357247 posted

    Can you please restart your IIS and check once

    Friday, October 26, 2012 3:16 AM