IIS/ASP/Caching
Author
Discussion

PetrolTed

Original Poster:

34,466 posts

329 months

Friday 26th March 2004
quotequote all
Anyone got any experience of cache control both at the server level and within scripting?

Mark.S

473 posts

303 months

Friday 26th March 2004
quotequote all
Do you mean IIS's internal caching or a custom cache component?

PetrolTed

Original Poster:

34,466 posts

329 months

Friday 26th March 2004
quotequote all
IIS/HTTP Internal caching rather than any external components.

I want to clarify the best means of controlling caching when using ASP. I've read up and think I understand what's required but would like to check that against someone's real world experiences.

Mark.S

473 posts

303 months

Friday 26th March 2004
quotequote all
Not quite sure what your after, can you give an example of the problem your seeing?

Used to see occasions where IIS would continue to show its cached version of an html page after it was updated and generally it required a stop/start of the service to start playing ball again.

PetrolTed

Original Poster:

34,466 posts

329 months

Friday 26th March 2004
quotequote all
I think I'm preventing caching most pages and want to enable it (seems default IIS setting is to not allow proxies to cache).

Just want to know if anyone had sussed the IIS settings to enable and the headers to put in ASP or the right combination of settings.

HarryW

15,954 posts

295 months

Friday 26th March 2004
quotequote all
something just went over my head but I'm not sure what though

H

JamieBeeston

9,294 posts

291 months

Friday 26th March 2004
quotequote all
One issue you will come accross in this Ted, is that of the Major ISPs being gits.

Its the Same with dns, they throw the TTls out the window, and dont follow RFC guidelines, instead opting to impose their own TTLs on domains, and not refresh their core routers until 2-3am.

Even if you have a 5 min ttl, ntl wont adopt or check until the next day.

The same is true of their caching/transparent proxying, in an effort to limit their b/w bills, and to stop DDOS (so they say!) they tend to limit the number of 'fresh' times a page is access to their own rules.

So whilst you might SAY only cache for 5 mins, whether they do or not is another matter, given that tho, they do tend to be fair on dynamicly generated content.

I know within PHP we can set pages to cache or not, as we make an active use of this on some of our pages, but within ASP, I shall ask my Developerss.

PetrolTed

Original Poster:

34,466 posts

329 months

Friday 26th March 2004
quotequote all
Thanks, that's useful.

PHP or ASP it should be the same techique I guess as from what I understand it's just what tags to put in the HTTP header. I was wondering whether to turn on the public-cache option at the IIS level.

Basically everything's being told 'don't cache' currently, but there are areas of the site that it would make sense for me to allow to be cached.

Mark.S

473 posts

303 months

Sunday 28th March 2004
quotequote all
I've generally left the cache directives options off in IIS and added the necessary headers via an include in dynamically generated pages. That way your static content is still viable for cache servers and the dynamic stuff should be left alone.