vb.net - Items added to cache are not surviving beyond page reload -


i have had caching working in app time, not sure when or why stopped working. can add items cache, when @ cache on page reload, cache empty. here code:

protected sub page_load(byval sender object, byval e system.eventargs) handles me.load      each entry dictionaryentry in httpruntime.cache         response.write("existing cache entry: " & entry.key.tostring & "<br>")     next      dim odataset dataset = ctype(httpruntime.cache.get("test"), dataset)      if odataset nothing               dim oconnection sqlconnection = new sqlconnection(rsutilities.getdatabaseconnectioninfo("rscustomer-3"))             dim mycommand sqldataadapter = new sqldataadapter("select @@version", oconnection)             dim olivedataset new dataset             mycommand.fill(olivedataset)             oconnection.close()             oconnection.dispose()              httpruntime.cache.insert("test", olivedataset, nothing, datetime.now.addminutes(60), timespan.zero)              each entry dictionaryentry in httpruntime.cache                 response.write("new cache: " & entry.key.tostring & "<br>")             next          else          response.write("nothing added cache<br>")      end if  end sub 

i check apppool, , still set default 1 day refresh, created new pool, , assigned pool site, same results. assigned default asp.net pool , same results there.

i not sure here. thoughts?


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -