Merge pull request #3158 from Krymonota/fix-veoh-privacy-policy-link-text
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / cache / builder / ICacheBuilder.class.php
1 <?php
2 namespace wcf\system\cache\builder;
3
4 /**
5 * A cache builder provides data for the cache handler that ought to be cached.
6 *
7 * @author Alexander Ebert
8 * @copyright 2001-2017 WoltLab GmbH
9 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
10 * @package WoltLabSuite\Core\System\Cache\Builder
11 */
12 interface ICacheBuilder {
13 /**
14 * Returns the data that ought to be cached.
15 *
16 * @param array $parameters
17 * @param string $arrayIndex
18 * @return mixed
19 */
20 public function getData(array $parameters = [], $arrayIndex = '');
21
22 /**
23 * Returns maximum lifetime for cache resource.
24 *
25 * @return integer
26 */
27 public function getMaxLifetime();
28
29 /**
30 * Flushes cache. If no parameters are given, all caches starting with
31 * the same cache name will be flushed too.
32 *
33 * @param array $parameters
34 */
35 public function reset(array $parameters = []);
36 }