« Return to Thread: Making Smarty's cache HTTP header aware

Re: Making Smarty's cache HTTP header aware

by howard chen :: Rate this Message:

Reply to Author | View in Thread

On Nov 8, 2007 5:58 AM, Luke Baker <lukebaker@...> wrote:

> Hi,
>
> Currently, when Smarty caches content it has no knowledge of the HTTP
> headers that the script served to the client.  In the case where the
> cache is cleared and the action sends special HTTP headers to the
> client, those HTTP headers only get sent on the first response and
> subsequent responses read from the cache and don't send the HTTP
> headers.
>
> PHP5 provides the headers_list() function, so I've modified Smarty to
> include that information in the cache meta-data and pass those headers
> onto the client it when the headers are available in the meta-data.
> This feature is PHP5 only, but will not break PHP4 code.
>
> Attached is the changes I made against Smarty 2.6.18.  I'd appreciate
> consideration for adding these changes to the Smarty core.
>
> Thanks,
>
> Luke Baker
>

Hello,

I don't think we should HTTP header handling in the Smarty core, it is
always easy to create a View class which handle all sort of HTTP
header handling.

Especially these functions didn't work with PHP4, which is bad.

--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

 « Return to Thread: Making Smarty's cache HTTP header aware

LightInTheBox - Buy quality products at wholesale price!