Skip to content
Snippets Groups Projects
Commit 2810b6e0 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Several type fixes.

Rev: lib/modules/Cache.pmod/Policy.pmod/Base.pike:1.5
Rev: lib/modules/Cache.pmod/Policy.pmod/Multiple.pike:1.5
Rev: lib/modules/Cache.pmod/Policy.pmod/Null.pike:1.5
Rev: lib/modules/Cache.pmod/Policy.pmod/Sized.pike:1.5
Rev: lib/modules/Cache.pmod/Policy.pmod/Timed.pike:1.6
Rev: lib/modules/Cache.pmod/Storage.pmod/Base.pike:1.8
parent ecfe6895
Branches
Tags
No related merge requests found
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
* *
* All Storage-related class must MUST implement this method. * All Storage-related class must MUST implement this method.
* *
* $Id: Base.pike,v 1.4 2002/01/15 22:31:24 nilsson Exp $ * $Id: Base.pike,v 1.5 2003/01/16 14:35:58 grubba Exp $
*/ */
#pike __REAL_VERSION__ #pike __REAL_VERSION__
void expire(Cache.Storage storage) { void expire(Cache.Storage.Base storage) {
throw("Override this!"); throw("Override this!");
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* A multiple-policies expiration policy manager. * A multiple-policies expiration policy manager.
* by Francesco Chemolli <kinkie@roxen.com> * by Francesco Chemolli <kinkie@roxen.com>
* *
* $Id: Multiple.pike,v 1.4 2002/01/15 22:31:24 nilsson Exp $ * $Id: Multiple.pike,v 1.5 2003/01/16 14:35:58 grubba Exp $
*/ */
#pike __REAL_VERSION__ #pike __REAL_VERSION__
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
inherit Cache.Policy.Base; inherit Cache.Policy.Base;
private array(Cache.Policy.Base) my_policies; private array(Cache.Policy.Base) my_policies;
void expire (Cache.Storage storage) { void expire (Cache.Storage.Base storage) {
foreach(my_policies, object policy) { foreach(my_policies, object policy) {
policy->expire(storage); policy->expire(storage);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Null policy-manager for the generic Caching system * Null policy-manager for the generic Caching system
* by Francesco Chemolli <kinkie@roxen.com> * by Francesco Chemolli <kinkie@roxen.com>
* *
* $Id: Null.pike,v 1.4 2002/01/15 22:31:24 nilsson Exp $ * $Id: Null.pike,v 1.5 2003/01/16 14:35:58 grubba Exp $
* *
* This is a policy manager that doesn't actually expire anything. * This is a policy manager that doesn't actually expire anything.
* It is useful in multilevel and/or network-based caches. * It is useful in multilevel and/or network-based caches.
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
#pike __REAL_VERSION__ #pike __REAL_VERSION__
void expire (Cache.Storage storage) { void expire (Cache.Storage.Base storage) {
/* empty */ /* empty */
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* An LRU, size-constrained expiration policy manager. * An LRU, size-constrained expiration policy manager.
* by Francesco Chemolli <kinkie@roxen.com> * by Francesco Chemolli <kinkie@roxen.com>
* *
* $Id: Sized.pike,v 1.4 2002/01/15 22:31:24 nilsson Exp $ * $Id: Sized.pike,v 1.5 2003/01/16 14:35:58 grubba Exp $
*/ */
#pike __REAL_VERSION__ #pike __REAL_VERSION__
...@@ -16,7 +16,7 @@ int min_size=0; ...@@ -16,7 +16,7 @@ int min_size=0;
#define KEY 0 #define KEY 0
#define SIZE 1 #define SIZE 1
void expire (Cache.Storage storage) { void expire (Cache.Storage.Base storage) {
ADT.Priority_queue removables=ADT.Priority_queue(); ADT.Priority_queue removables=ADT.Priority_queue();
Cache.Data got; Cache.Data got;
mixed tmp; mixed tmp;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* An access-time-based expiration policy manager. * An access-time-based expiration policy manager.
* by Francesco Chemolli <kinkie@roxen.com> * by Francesco Chemolli <kinkie@roxen.com>
* *
* $Id: Timed.pike,v 1.5 2002/01/15 22:31:24 nilsson Exp $ * $Id: Timed.pike,v 1.6 2003/01/16 14:35:58 grubba Exp $
*/ */
#pike __REAL_VERSION__ #pike __REAL_VERSION__
...@@ -15,7 +15,7 @@ private int ktime; ...@@ -15,7 +15,7 @@ private int ktime;
inherit Cache.Policy.Base; inherit Cache.Policy.Base;
void expire(Cache.Storage storage) { void expire(Cache.Storage.Base storage) {
werror("Expiring cache\n"); werror("Expiring cache\n");
int now=time(1); int now=time(1);
int limit=now-ktime; int limit=now-ktime;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Storage Manager prototype. * Storage Manager prototype.
* by Francesco Chemolli <kinkie@roxen.com> * by Francesco Chemolli <kinkie@roxen.com>
* *
* $Id: Base.pike,v 1.7 2002/03/09 18:08:04 nilsson Exp $ * $Id: Base.pike,v 1.8 2003/01/16 14:35:58 grubba Exp $
* *
* All storage managers must provide these methods. * All storage managers must provide these methods.
*/ */
...@@ -37,7 +37,7 @@ void set(string key, mixed value, ...@@ -37,7 +37,7 @@ void set(string key, mixed value,
// fetches some data from the cache synchronously. // fetches some data from the cache synchronously.
// be careful, as with some storage managers it might block the calling // be careful, as with some storage managers it might block the calling
// thread for some time. // thread for some time.
int(0..0)|Cache.Data get(string key) { int(0..0)|Cache.Data get(string key, void|int(0..1) notouch) {
T(); T();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment