1<?php
2
3namespace Doctrine\Common\Cache;
4
5/**
6 * Void cache driver. The cache could be of use in tests where you don`t need to cache anything.
7 *
8 * @link   www.doctrine-project.org
9 */
10class VoidCache extends CacheProvider
11{
12    /**
13     * {@inheritDoc}
14     */
15    protected function doFetch($id)
16    {
17        return false;
18    }
19
20    /**
21     * {@inheritDoc}
22     */
23    protected function doContains($id)
24    {
25        return false;
26    }
27
28    /**
29     * {@inheritDoc}
30     */
31    protected function doSave($id, $data, $lifeTime = 0)
32    {
33        return true;
34    }
35
36    /**
37     * {@inheritDoc}
38     */
39    protected function doDelete($id)
40    {
41        return true;
42    }
43
44    /**
45     * {@inheritDoc}
46     */
47    protected function doFlush()
48    {
49        return true;
50    }
51
52    /**
53     * {@inheritDoc}
54     */
55    protected function doGetStats()
56    {
57        return;
58    }
59}
60