4 * This file is part of the Behat Gherkin.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Gherkin\Cache;
13 use Behat\Gherkin\Node\FeatureNode;
16 * Parser cache interface.
18 * @author Konstantin Kudryashov <ever.zet@gmail.com>
20 interface CacheInterface
23 * Checks that cache for feature exists and is fresh.
25 * @param string $path Feature path
26 * @param integer $timestamp The last time feature was updated
30 public function isFresh($path, $timestamp);
33 * Reads feature cache from path.
35 * @param string $path Feature path
39 public function read($path);
42 * Caches feature node.
44 * @param string $path Feature path
45 * @param FeatureNode $feature Feature instance
47 public function write($path, FeatureNode $feature);