1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Config;
13
14/**
15 * Interface for a ConfigCache factory. This factory creates
16 * an instance of ConfigCacheInterface and initializes the
17 * cache if necessary.
18 *
19 * @author Matthias Pigulla <mp@webfactory.de>
20 */
21interface ConfigCacheFactoryInterface
22{
23    /**
24     * Creates a cache instance and (re-)initializes it if necessary.
25     *
26     * @param string   $file     The absolute cache file path
27     * @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback
28     *
29     * @return ConfigCacheInterface The cache instance
30     */
31    public function cache($file, $callable);
32}
33