Controlled.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_SRC_STORE_CONTROLLED_H
10 #define SQUID_SRC_STORE_CONTROLLED_H
11 
12 #include "store/Storage.h"
13 
14 namespace Store {
15 
18 class Controlled: public Storage
19 {
20 public:
25  virtual StoreEntry *get(const cache_key *) = 0;
26 
28  virtual void reference(StoreEntry &e) = 0;
29 
32  virtual bool dereference(StoreEntry &e) = 0;
33 
35  virtual void updateHeaders(StoreEntry *) {}
36 
39  virtual bool anchorToCache(StoreEntry &) { return false; }
40 
44  virtual bool updateAnchored(StoreEntry &) { return false; }
45 };
46 
47 } // namespace Store
48 
49 #endif /* SQUID_SRC_STORE_CONTROLLED_H */
50 
virtual bool dereference(StoreEntry &e)=0
unsigned char cache_key
Store key.
Definition: forward.h:29
virtual bool updateAnchored(StoreEntry &)
Definition: Controlled.h:44
virtual StoreEntry * get(const cache_key *)=0
virtual void updateHeaders(StoreEntry *)
make stored metadata and HTTP headers the same as in the given entry
Definition: Controlled.h:35
virtual bool anchorToCache(StoreEntry &)
Definition: Controlled.h:39
virtual void reference(StoreEntry &e)=0
somebody needs this entry (many cache replacement policies need to know)

 

Introduction

Documentation

Support

Miscellaneous