Re: Apache dynamic page caching?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

On Wed, Apr 16, 2008 at 9:21 PM, Narendra Verma
<narendra.verma@xxxxxxxxxxxxx> wrote:
> Hi Howard,
>  1. Be sure to load following module
>
>     LoadModule headers_module modules/mod_headers.so
>
>  2. Add following Header directive at the last of httpd.conf file.
>
>     Header add Cache-Control max-age=3600              (in seconds)
>
>  Here we can decide that what is the maximum age of cached response.
>  If max-age passed then apache again sends request to backend(tomcat) for re-caching, if the body of response is not found modified then 304 status is found means existing cache would be used.If body changed then then it is re-cached. You can use any amount of time to decide re-caching.
>

The problem is I don't know to cache for how long. Maybe 1 month, or
maybe one second, consider a blog post, it will be only updated when a
user leave a comment, but the exact time is unpredictable.

Currently I am using PHP / Smarty cache, if a user leave a comment, I
will remove cache from the file system and the cache will be
re-generated next time if cache miss.

The only draw back is since for a cached case, I am sending HTML via
PHP, so why I don't send the cache via Apache? The lighttpd Cache Meta
Language (http://en.wikipedia.org/wiki/Cache_Meta_Language) is what
exactly doing what I want, but I am just wondering if Apache users
have think of this before? )

On the other hand, mod_cache seems can't do what I want. Squid did
(wikipedia is using similar approach with "purge' multicast). Of coz
setting a squid is another overhead for my simple use.

Howard

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux