|
8 | 8 | * Discards any kind of frontend data input. This frontend does not have expiration time or any other options
|
9 | 9 | *
|
10 | 10 | *<code>
|
11 |
| - * |
12 |
| - * //Create a None Cache |
13 |
| - * $frontCache = new Phalcon\Cache\Frontend\None(); |
14 | 11 | *
|
15 |
| - * // Create the component that will cache "Data" to a "Memcached" backend |
16 |
| - * // Memcached connection settings |
17 |
| - * $cache = new Phalcon\Cache\Backend\Memcached($frontCache, array( |
18 |
| - * "host" => "localhost", |
19 |
| - * "port" => "11211" |
20 |
| - * )); |
| 12 | + * //Create a None Cache |
| 13 | + * $frontCache = new Phalcon\Cache\Frontend\None(); |
21 | 14 | *
|
22 |
| - * // This Frontend always return the data as it's returned by the backend |
23 |
| - * $cacheKey = 'robots_order_id.cache'; |
24 |
| - * $robots = $cache->get($cacheKey); |
25 |
| - * if ($robots === null) { |
| 15 | + * // Create the component that will cache "Data" to a "Memcached" backend |
| 16 | + * // Memcached connection settings |
| 17 | + * $cache = new Phalcon\Cache\Backend\Memcache($frontCache, array( |
| 18 | + * "host" => "localhost", |
| 19 | + * "port" => "11211" |
| 20 | + * )); |
26 | 21 | *
|
27 |
| - * // This cache doesn't perform any expiration checking, so the data is always expired |
28 |
| - * // Make the database call and populate the variable |
29 |
| - * $robots = Robots::find(array("order" => "id")); |
| 22 | + * // This Frontend always return the data as it's returned by the backend |
| 23 | + * $cacheKey = 'robots_order_id.cache'; |
| 24 | + * $robots = $cache->get($cacheKey); |
| 25 | + * if ($robots === null) { |
30 | 26 | *
|
31 |
| - * $cache->save($cacheKey, $robots); |
32 |
| - * } |
| 27 | + * // This cache doesn't perform any expiration checking, so the data is always expired |
| 28 | + * // Make the database call and populate the variable |
| 29 | + * $robots = Robots::find(array("order" => "id")); |
33 | 30 | *
|
34 |
| - * // Use $robots :) |
35 |
| - * foreach ($robots as $robot) { |
36 |
| - * echo $robot->name, "\n"; |
37 |
| - * } |
38 |
| - *</code> |
| 31 | + * $cache->save($cacheKey, $robots); |
| 32 | + * } |
39 | 33 | *
|
| 34 | + * // Use $robots :) |
| 35 | + * foreach ($robots as $robot) { |
| 36 | + * echo $robot->name, "\n"; |
| 37 | + * } |
| 38 | + *</code> |
40 | 39 | */
|
41 | 40 |
|
42 | 41 | class None implements \Phalcon\Cache\FrontendInterface {
|
43 | 42 |
|
44 |
| - /** |
45 |
| - * \Phalcon\Cache\Frontend\None constructor |
46 |
| - * |
47 |
| - * @param array $frontendOptions |
48 |
| - */ |
49 |
| - public function __construct($frontendOptions=null){ } |
50 |
| - |
51 |
| - |
52 | 43 | /**
|
53 | 44 | * Returns cache lifetime, always one second expiring content
|
54 | 45 | *
|
|
0 commit comments