Saturday, October 31, 2009

Re: caching Media View

Setting the 'cache' option will send the Cache-Control: max-
age=<time>, Expires=<converted time> and Pragma: cache headers. It
does not change the response HTTP 1.1 code to 304, nor does it set the
If-Modified-Since header.

-j.

On Oct 31, 2:17 am, tol <daviddevr...@gmail.com> wrote:
> Can someone tell me how caching in media views is supposed to work?
>
> example:
>         $this->view = 'Media';
>         $params = array(
>               'id' => $id,
>               'cache' => 100000,
>               'download' => false,
>               'extension' => 'jpg',
>               'path' => 'restricted' . DS . 'uservideo' . DS
>
>        );
>        $this->set($params);
>
> Works fine but I get the feeling its not caching. The headers of the
> images are 200 OK not 304
> Am I doing something wrong? Or am I misunderstanding / overlooking
> something?
> 'cache'=>true does not change anything either...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: