ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Cleanup.php
Go to the documentation of this file.
1<?php
2
8{
12 public $name = 'Cleanup';
13
17 public function copy()
18 {
20 }
21
27 public function add($def, $config)
28 {
29 $status = parent::add($def, $config);
30 if (!$status) {
31 parent::cleanup($config);
32 }
33 return $status;
34 }
35
41 public function set($def, $config)
42 {
43 $status = parent::set($def, $config);
44 if (!$status) {
45 parent::cleanup($config);
46 }
47 return $status;
48 }
49
55 public function replace($def, $config)
56 {
57 $status = parent::replace($def, $config);
58 if (!$status) {
59 parent::cleanup($config);
60 }
61 return $status;
62 }
63
68 public function get($config)
69 {
70 $ret = parent::get($config);
71 if (!$ret) {
72 parent::cleanup($config);
73 }
74 return $ret;
75 }
76}
77
78// vim: et sw=4 sts=4
Definition cache decorator class that cleans up the cache whenever there is a cache miss.
Definition: Cleanup.php:8