Re: caching Media View

2009-10-31 Thread jperras

Setting the 'cache' option will send the Cache-Control: max-
age=, Expires= 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  wrote:
> Can someone tell me how caching in media views is supposed to work?
>
> example:
>         $this->view = 'Media';
>         $params = array(
>               'id' => $id,
>               'cache' => 10,
>               '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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



caching Media View

2009-10-30 Thread tol

Can someone tell me how caching in media views is supposed to work?

example:
$this->view = 'Media';
$params = array(
  'id' => $id,
  'cache' => 10,
  '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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---