Asp.net cache expiration isn't working on the host that I've just moved
to. The cache just doesn't expire. It's not the code because it works
fine on my localhost and at my previous hosting provider.
HttpRuntime.Cac he.Insert(XmlCa cheKey,ds,null, Cache.NoAbsolut eExpiration,
TimeSpan.FromMi nutes(1),CacheI temPriority.Nor mal,saveData)
I'm using it as a write-back cache that saves the in-memory dataset to
disk every minute if dirty and also on session end, so it's critical
that the cache expires.
I asked my hosting provider if they have disabled expiration using
<cache disableExpirati on="false"/and they said no.
Is there any other reason anyone can think of why the cache won't
expire? 4 4759
How often is this item being accessed? If it's being accessed at least once
a minute then it won't expire from the cache. I'm just wondering if there is
something that could be scanning a file that makes use of this cached item,
causing it not to drop out of the cache.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
<fn*****@gmail. comwrote in message
news:11******** **************@ v45g2000cwv.goo glegroups.com.. .
Asp.net cache expiration isn't working on the host that I've just moved
to. The cache just doesn't expire. It's not the code because it works
fine on my localhost and at my previous hosting provider.
HttpRuntime.Cac he.Insert(XmlCa cheKey,ds,null, Cache.NoAbsolut eExpiration,
TimeSpan.FromMi nutes(1),CacheI temPriority.Nor mal,saveData)
I'm using it as a write-back cache that saves the in-memory dataset to
disk every minute if dirty and also on session end, so it's critical
that the cache expires.
I asked my hosting provider if they have disabled expiration using
<cache disableExpirati on="false"/and they said no.
Is there any other reason anyone can think of why the cache won't
expire?
Thank you for your reply.
It can't be that because it doesn't expire even when I stop the
application. (normally all cache is expired when application ends)
On Jan 26, 8:10 am, "Mark Fitzpatrick" <markf...@fitzm e.comwrote:
How often is this item being accessed? If it's being accessed at least once
a minute then it won'texpirefrom thecache. I'm just wondering if there is
something that could be scanning a file that makes use of this cached item,
causing it not to drop out of thecache.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
<fnus...@gmail. comwrote in messagenews:11* *************** ******@v45g2000 cwv.googlegroup s.com...
Asp.netcacheexp iration isn't working on the host that I've just moved
to. Thecachejust doesn'texpire. It's not the code because it works
fine on my localhost and at my previous hosting provider.
HttpRuntime.Cac he.Insert(XmlCa cheKey,ds,null, Cache.NoAbsolut eExpiration,
TimeSpan.FromMi nutes(1),CacheI temPriority.Nor mal,saveData)
I'm using it as a write-backcachethat saves the in-memory dataset to
disk every minute if dirty and also on session end, so it's critical
that thecacheexpires .
I asked my hosting provider if they have disabled expiration using
<cachedisableEx piration="false "/and they said no.
Is there any other reason anyone can think of why thecachewon't
expire?- Hide quoted text -- Show quoted text -
I've further narrowed the problem. What is actually happening is the
cache IS expiring but the callback method saveData is not being
called. Again this works fine in the development environment but not
in the hosting environment.
An additional piece of info is that the host environment is win2k3 and
my dev environment is win2k. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: martin |
last post by:
Hi,
I am storing a dataset in cache, which is happening fine. I can easily
retrive it at postback from the cache, cast it to a dataset and reuse it.
However I have specified that the cache expire in 5 minutes like so.
If Not IsPostBack Then
BindMyDropDown()
Else
Response.Write("<hr>Cache Expires 5 minutes" &
|
by: C Elson |
last post by:
I was hoping someone can help me out.
I've searched the pages here and on numerous sites and cannot find an
answer that works. I'm trying this code RC4 Encryption/Decryption
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6646&lngWId=4
But there is no way (I can find) to clear the script afterwards. I'm
trying to make it secure and when I try Back buttons I can still see
the original code. I've tried all I could...
|
by: Promenade |
last post by:
Hi, everyone...
I want to avoid the user to use the navigator back button.
For that reason, I tried all the possible ways to set the Expires property
of the Response Object, but whatever I do, it does not work for me.
In fact, it does work once, the first time I wrote these lines in the
Application_BeginRequest event of the Global.asax file:
Response.Buffer = True
Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0, 0))...
|
by: Joe Fallon |
last post by:
I am trying to setup a cache that refreshes itself every hour. (My sample
code is for every minute so I can test it.)
I have found some examples that I thought worked but they all seem to fail.
(They only work when I click the submit button - not when the cache
expires.)
In my Login form I have:
Global.AddItemToCache("CacheTime", Date.Now, 60)
|
by: NWx |
last post by:
Hi,
I' trying to implement a callback method when a cache object expires
I want to do this to automatically logout user after a timeout (for demo
purposes)
My thought is, when user logon, create a cache object which expires after,
let's say, 15 minutes, and in that moment, to direct user to a page telling
the time to run demo app was expired.
| |
by: Chris |
last post by:
In asp we have "Response.Expires = 0" and I've tried:
HttpResponse.RemoveOutputCacheItem("page location")
But I can't get the page to display new. This is a problem if the data is
changed and the page is revisted. I find it hard to believe that adding a
bogus random value to the url is the only method to avoid this?
If I press the refresh button on my IE6 browser the page displays the
correct data. How is this accomplished?
Thanx.
|
by: Tom.PesterDELETETHISSS |
last post by:
Hi,
I think this question requires an in depth understanding of how a browser
cache works. I hope I can reach an expert here.
I may have found a quirk in the asp.net documentation or I don't understand
what the SetAllowResponseInBrowserHistory does.
While researching caching I tried the code sample at the following page :
http://msdn2.microsoft.com/library/97wcd0a4(en-us,vs.80).aspx
|
by: EagleRed |
last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some
pages that must not be cached on the client. In ASP.NET 1.1 I achieved this
using metatags:
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
This tags are part of the <headelement. Sample code that I have seen
shows how to add metatags of the form:
|
by: wpt394 |
last post by:
Hello everyone,
I have a little script that seems to hang up in internet explorer every now and again.
Basically, I have a php page that sets the following headers:
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
header( "Cache-Control: post-check=1,pre-check=2" );
header( "Cache-Control: no-cache, must-revalidate" );
|
by: WALDO |
last post by:
I am having the exact same problem. I am using VS2008 (.Net 3.5) and I
can't set the Expires date out any further than one day.
Doing a little reflection, I see that in the HttpCachePolicy class,
SetExpires() method, if the expires is already set, it will only change
if the new expiration date is less than the existing one.
I have removed all of my custom HttpModules and discovered that none of
mine are setting the expiration.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |