Won't cache html pages

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Won't cache html pages

BabyPunt
I've just set up Squid, but somehow it will only cache images, CSS,
and JS files.  How do I get it to cache html pages?

Also, many of my pages have no extensions on them, for instance:
http://www.example.com/article/today_is_hot

How would I cache these pages?
Reply | Threaded
Open this post in threaded view
|

Re: Won't cache html pages

Henrik Nordström
On tor, 2007-09-06 at 14:05 +0800, K J wrote:
> I've just set up Squid, but somehow it will only cache images, CSS,
> and JS files.  How do I get it to cache html pages?

To Squid there is no difference. What matters is what freshness
information the server has assigned to the object.

http://www.mnot.net/cacheability/ or direct link
http://www.ircache.net/cgi-bin/cacheability.py

further information

http://www.mnot.net/cache_docs/

Regards
Henrik

signature.asc (316 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Won't cache html pages

BabyPunt
> To Squid there is no difference. What matters is what freshness
> information the server has assigned to the object.


That's strange, because I'm looking at the access.log and I always see
TCP_MISS/200 on pages other than gif/jpg/css/js.

Is there a setting within Squid that lets me specify what file types
or URLs to cache and not cache?
Reply | Threaded
Open this post in threaded view
|

Re: Won't cache html pages

Adrian Chadd
On Fri, Sep 07, 2007, K J wrote:
> > To Squid there is no difference. What matters is what freshness
> > information the server has assigned to the object.
>
> That's strange, because I'm looking at the access.log and I always see
> TCP_MISS/200 on pages other than gif/jpg/css/js.
>
> Is there a setting within Squid that lets me specify what file types
> or URLs to cache and not cache?

Yup, refresh_pattern lines and the cache/no_cache directive.



Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Won't cache html pages

Henrik Nordström
In reply to this post by BabyPunt
On fre, 2007-09-07 at 14:00 +0800, K J wrote:
> > To Squid there is no difference. What matters is what freshness
> > information the server has assigned to the object.
>
>
> That's strange, because I'm looking at the access.log and I always see
> TCP_MISS/200 on pages other than gif/jpg/css/js.

Did you verify the page using the cacheability check engine?

http://www.ircache.net/cgi-bin/cacheability.py

> Is there a setting within Squid that lets me specify what file types
> or URLs to cache and not cache?

Yes, but it's mainly driven by information provided by the web server.

Regards
Henrik

signature.asc (316 bytes) Download Attachment