[moriarty] r252 committed - user can now define MORIARTY_ALWAYS_CACHE_EVERYTHING to force caching

3 views
Skip to first unread message

mori...@googlecode.com

unread,
Jan 25, 2010, 9:12:52 AM1/25/10
to moriar...@googlegroups.com
Revision: 252
Author: K.J.W.Alexander
Date: Mon Jan 25 06:12:06 2010
Log: user can now define MORIARTY_ALWAYS_CACHE_EVERYTHING to force caching
http://code.google.com/p/moriarty/source/detail?r=252

Modified:
/trunk/httprequest.class.php

=======================================
--- /trunk/httprequest.class.php Tue Aug 18 04:48:44 2009
+++ /trunk/httprequest.class.php Mon Jan 25 06:12:06 2010
@@ -152,7 +152,7 @@

if (! $this->_response_from_cache ) {
$max_age = FALSE;
- if ( $this->method == 'GET' && $response->is_cacheable() ) {
+ if ( defined('MORIARTY_ALWAYS_CACHE_EVERYTHING') || ($this->method
== 'GET' && $response->is_cacheable()) ) {
$cache_control = $response->headers['cache-control'];
$cache_control_tokens = split(',', $cache_control);
foreach ( $cache_control_tokens as $token) {

Reply all
Reply to author
Forward
0 new messages