2000-09-19
2000-09-19 22:46:08 by Per Hedbor <ph@opera.com>
-
c3c632c8de88169ee31b7ca846433a537600b7da
(11 lines)
(+8/-3)
[
Show
| Annotate
]
Branch: 5.2
Fix for the RAM cache.
Rev: server/etc/modules/Roxen.pmod:1.39
Rev: server/protocols/http.pike:1.277
2:
// Modified by Francesco Chemolli to add throttling capabilities.
// Copyright © 1996 - 2000, Roxen IS.
- constant cvs_version = "$Id: http.pike,v 1.276 2000/09/19 22:43:48 per Exp $";
+ constant cvs_version = "$Id: http.pike,v 1.277 2000/09/19 22:45:57 per Exp $";
// #define REQUEST_DEBUG
#define MAGIC_ERROR
2120: Inside #if defined(RAM_CACHE)
if( mixed e = catch
{
foreach( file->callbacks, function f )
- if( !f() )
+ if( !f(this_object(), cv[1]->key ) )
{
can_cache = 0;
break;
}
} )
{
- can_cache = 0;
+
INTERNAL_ERROR( e );
send_result();
return;
}
}
-
+ if( !cv[1]->key )
+ {
+ conf->datacache->expire_entry( raw_url );
+ can_cache = 0;
+ }
if( can_cache )
{
#ifndef RAM_CACHE_ASUME_STATIC_CONTENT