Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2002-2008 (original work) Public Research Centre Henri Tudor & University of Luxembourg |
| 19 | * (under the project TAO & TAO2); |
| 20 | * 2008-2010 (update and modification) Deutsche Institut für Internationale Pädagogische Forschung |
| 21 | * (under the project TAO-TRANSFER); |
| 22 | * 2009-2012 (update and modification) Public Research Centre Henri Tudor |
| 23 | * (under the project TAO-SUSTAIN & TAO-DEV); |
| 24 | * 2013-2014 (update and modification) Open Assessment Technologies SA; |
| 25 | */ |
| 26 | |
| 27 | /** |
| 28 | * basic interface a cache implementation has to implement |
| 29 | * @deprecated please use oat\oatbox\cache\SimpleCache |
| 30 | */ |
| 31 | interface common_cache_Cache |
| 32 | { |
| 33 | /** |
| 34 | * Service manager id. |
| 35 | */ |
| 36 | public const SERVICE_ID = 'generis/cache'; |
| 37 | |
| 38 | // --- OPERATIONS --- |
| 39 | |
| 40 | /** |
| 41 | * puts "something" into the cache, |
| 42 | * * If this is an object and implements Serializable, |
| 43 | * * we use the serial provided by the object |
| 44 | * * else a serial must be provided |
| 45 | * @access public |
| 46 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 47 | * @param mixed $mixed |
| 48 | * @param null $serial |
| 49 | * @param null $ttl |
| 50 | * @return mixed |
| 51 | */ |
| 52 | public function put($mixed, $serial = null, $ttl = null); |
| 53 | |
| 54 | /** |
| 55 | * gets the entry associted to the serial |
| 56 | * throws an exception if not found |
| 57 | * |
| 58 | * @access public |
| 59 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 60 | * @param string serial |
| 61 | * @return common_Serializable |
| 62 | * @throws common_cache_NotFoundException |
| 63 | */ |
| 64 | public function get($serial); |
| 65 | |
| 66 | /** |
| 67 | * test whenever an entry associted to the serial exists |
| 68 | * |
| 69 | * @access public |
| 70 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 71 | * @param string serial |
| 72 | * @return boolean |
| 73 | */ |
| 74 | public function has($serial); |
| 75 | |
| 76 | /** |
| 77 | * removes an entry from the cache |
| 78 | * |
| 79 | * @access public |
| 80 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 81 | * @param string serial |
| 82 | * @return mixed |
| 83 | */ |
| 84 | public function remove($serial); |
| 85 | |
| 86 | /** |
| 87 | * empties the cache |
| 88 | * |
| 89 | * @access public |
| 90 | * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu> |
| 91 | * @return mixed |
| 92 | */ |
| 93 | public function purge(); |
| 94 | } |