473,804 Members | 3,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cache

All,

Can we enable/disable the cache for each control separately or it's a global
feature for the whole page? I'm aware of many settings and some bugs
regarding cache but I've never seen anything on a control based level. I
know that if we place these 3 strings in aspx header then we can kill the
most of the caches beginning from the server and down to the client machine.

<META http-equiv="Pragma" content="NO-CACHE">
<META http-equiv="Expires" content="-1">
<META http-equiv="CACHE-CONTROL" content="NO-CACHE">

We also can use that in C# file on Page_Load()

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);

for the same purpose and it really works great.

But I still want to enable caching for some of the controls, JS, Images,
etc. to reload only the dynamic content of the page. I know that if the JS
are placed into the separate files then they will be cached on the client
side, but maybe I'm wrong with that.

The only real reason why I started this war with caches is a lot of bugs and
problems in all layers beginning from the browsers. If the user clicks the
button then the datagrid for example should refresh of something and then
the page should show the updated content of the datagrid. It's just one of
many example. In real life everytihg's fine, I see in the debugger that it
works, but the client machine decides for some reason that the page content
wasn't updated, it has its own opinion about that, and shows the previous
page from its buffer. Crap! When I disabled all possible and impossible
caches it started working great but the delay before click-see became longer
and in some places significantly longer. That's why I wanted to cache some
heavy elements and disable the cache for the dynamic ones only.

One additional info - the released app works under SSL HTTPS, so the
encrypted pages should not be saved on the client machine by default...
theretically.

PLease help who knows about these bugs and features more.

Thanks,
Just D.
Mar 1 '06 #1
2 1745
One option is to add a control to a user control. That way you can handle
caching with @outputcache directives.

http://msdn.microsoft.com/library/de...utputcache.asp

"Setting values for the page output cache is the same as manipulating the
HttpCachePolicy .SetExpires and HttpCachePolicy .SetCacheabilit y methods
through the HttpResponse.Ca che property."
"Just D." <no@spam.please > wrote in message
news:MTpNf.251$ y24.213@fed1rea d10...
All,

Can we enable/disable the cache for each control separately or it's a
global feature for the whole page? I'm aware of many settings and some
bugs regarding cache but I've never seen anything on a control based
level. I know that if we place these 3 strings in aspx header then we can
kill the most of the caches beginning from the server and down to the
client machine.

<META http-equiv="Pragma" content="NO-CACHE">
<META http-equiv="Expires" content="-1">
<META http-equiv="CACHE-CONTROL" content="NO-CACHE">

We also can use that in C# file on Page_Load()

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);

for the same purpose and it really works great.

But I still want to enable caching for some of the controls, JS, Images,
etc. to reload only the dynamic content of the page. I know that if the JS
are placed into the separate files then they will be cached on the client
side, but maybe I'm wrong with that.

The only real reason why I started this war with caches is a lot of bugs
and problems in all layers beginning from the browsers. If the user clicks
the button then the datagrid for example should refresh of something and
then the page should show the updated content of the datagrid. It's just
one of many example. In real life everytihg's fine, I see in the debugger
that it works, but the client machine decides for some reason that the
page content wasn't updated, it has its own opinion about that, and shows
the previous page from its buffer. Crap! When I disabled all possible and
impossible caches it started working great but the delay before click-see
became longer and in some places significantly longer. That's why I wanted
to cache some heavy elements and disable the cache for the dynamic ones
only.

One additional info - the released app works under SSL HTTPS, so the
encrypted pages should not be saved on the client machine by default...
theretically.

PLease help who knows about these bugs and features more.

Thanks,
Just D.

Mar 2 '06 #2
Thanks, Ken!

That's interesting, I'm just wondering if I can enable caching for a list of
controls, but this is a good start to read about this stuff.

Just D.
"Ken Cox - Microsoft MVP" <BA**********@h otmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
One option is to add a control to a user control. That way you can handle
caching with @outputcache directives.

http://msdn.microsoft.com/library/de...utputcache.asp

"Setting values for the page output cache is the same as manipulating the
HttpCachePolicy .SetExpires and HttpCachePolicy .SetCacheabilit y methods
through the HttpResponse.Ca che property."
"Just D." <no@spam.please > wrote in message
news:MTpNf.251$ y24.213@fed1rea d10...
All,

Can we enable/disable the cache for each control separately or it's a
global feature for the whole page? I'm aware of many settings and some
bugs regarding cache but I've never seen anything on a control based
level. I know that if we place these 3 strings in aspx header then we can
kill the most of the caches beginning from the server and down to the
client machine.

<META http-equiv="Pragma" content="NO-CACHE">
<META http-equiv="Expires" content="-1">
<META http-equiv="CACHE-CONTROL" content="NO-CACHE">

We also can use that in C# file on Page_Load()

Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);

for the same purpose and it really works great.

But I still want to enable caching for some of the controls, JS, Images,
etc. to reload only the dynamic content of the page. I know that if the
JS are placed into the separate files then they will be cached on the
client side, but maybe I'm wrong with that.

The only real reason why I started this war with caches is a lot of bugs
and problems in all layers beginning from the browsers. If the user
clicks the button then the datagrid for example should refresh of
something and then the page should show the updated content of the
datagrid. It's just one of many example. In real life everytihg's fine, I
see in the debugger that it works, but the client machine decides for
some reason that the page content wasn't updated, it has its own opinion
about that, and shows the previous page from its buffer. Crap! When I
disabled all possible and impossible caches it started working great but
the delay before click-see became longer and in some places significantly
longer. That's why I wanted to cache some heavy elements and disable the
cache for the dynamic ones only.

One additional info - the released app works under SSL HTTPS, so the
encrypted pages should not be saved on the client machine by default...
theretically.

PLease help who knows about these bugs and features more.

Thanks,
Just D.


Mar 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2856
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" &
5
1738
by: Darrel | last post by:
I thought this warranted a new thread. Yesterday I asked about access relatively static content...is it better to read from the DB, or just grab a text file. It was suggested that I use the DB and look into the Application Cache settings. I found a good article here: http://www.developer.com/net/net/article.php/1477771
14
2102
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
1
2729
by: William Sullivan | last post by:
I'm trying to nail down some issues with the cache in my application. Currently, I have an object that stands between my business logic and database logic called CacheLogic (cute, no?). Global.asax.cs creates it in Application_Start, initializes it and places it in the cache. During initialization, CacheLogic retrieves data from the DB logic layer and caches it with removal callbacks set. Whenever an object in the business logic layer...
13
2353
by: Andrew Morton | last post by:
I am caching some data in VB.NET using System.Web.Caching, is it possible to lock the cache so that other sessions attempting to access the same cache wait when it is being updated? I have the cache using a sliding timeout and a dependency on the text file its data is extracted from. If it's relevant, based on current statistics, I do not expect more than about 400 people to be accessing the web site at the same time. I've seen it appears...
26
6283
by: Ed L. | last post by:
Here's some of my current notions on pgsql performance tuning strictly as it relates to pgsql tuning parameters in the context of a dedicated linux or hpux server. I'm particularly focusing on the shared_buffers setting. I invite any corrective or confirming feedback. I realize there are many other hugely important performance factors outside this scope. One key aspect of pgsql performance tuning is to adjust the memory ...
18
9162
by: siddharthkhare | last post by:
Hi All, what is the diference between these two cache control header. no-cache and no-store. I have read the w3.org explanation. So lets say I am using only no-cache ....my understanding is that nothing is cached and nothing is writen to disk.
0
2317
by: mateipuiu | last post by:
When a try to run a client build on 2005, which uses the Microsoft.ApplicationBlocks.Cache.dll reference, when using a Microsoft.ApplicationBlocks.Cache.dll created on Debug mode, the client works just fine, but when a use a Microsoft.ApplicationBlocks.Cache.dll created on Release mode, the client doesn't work no more, and I get this error message: ********************************************* 1) Exception Information...
5
2128
by: Stan SR | last post by:
Hi, Some newbie questions.. :-) First, what is the namespace to use for the Cache class ? When I use this bit of code I get an error if (Cache==null) Cache.Insert("myUserList",userlist); I don't know which namespace to use.
0
1981
by: =?Utf-8?B?YmlqYXk=?= | last post by:
The type initializer for 'Microsoft.ApplicationBlocks.Cache.CacheService' threw an exception. We migrated our windows application from 1.1 to 2.0. The debug and Release mode of the application work fine with some tweaking. But when the setup project is migrated to 2.0 the installation gives the follwing error: - <ExceptionInformation> <AdditionalInformationProperty ExceptionManager.MachineName="TestDev"...
0
9706
marktang
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...
0
9579
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,...
0
10571
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10317
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,...
0
9143
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
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...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.