TestAppCacheEngine.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * Test Suite Test App Cache Engine class.
  5. *
  6. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  7. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  8. *
  9. * Licensed under The MIT License
  10. * For full copyright and license information, please see the LICENSE.txt
  11. * Redistributions of files must retain the above copyright notice
  12. *
  13. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  14. * @link https://cakephp.org CakePHP(tm) Project
  15. * @since 1.3.0
  16. * @license https://opensource.org/licenses/mit-license.php MIT License
  17. */
  18. /**
  19. * TestAppCacheEngine
  20. */
  21. namespace TestApp\Cache\Engine;
  22. use Cake\Cache\CacheEngine;
  23. class TestAppCacheEngine extends CacheEngine
  24. {
  25. /**
  26. * @inheritDoc
  27. */
  28. public function set($key, $value, $ttl = null): bool
  29. {
  30. if ($key === 'fail') {
  31. return false;
  32. }
  33. return true;
  34. }
  35. /**
  36. * @inheritDoc
  37. */
  38. public function get($key, $default = null): mixed
  39. {
  40. }
  41. /**
  42. * @inheritDoc
  43. */
  44. public function increment(string $key, int $offset = 1): int|false
  45. {
  46. }
  47. /**
  48. * @inheritDoc
  49. */
  50. public function decrement(string $key, int $offset = 1): int|false
  51. {
  52. }
  53. /**
  54. * @inheritDoc
  55. */
  56. public function delete($key): bool
  57. {
  58. }
  59. /**
  60. * @inheritDoc
  61. */
  62. public function clear(): bool
  63. {
  64. }
  65. /**
  66. * @inheritDoc
  67. */
  68. public function clearGroup(string $group): bool
  69. {
  70. }
  71. /**
  72. * Return duration method result.
  73. *
  74. * @param mixed $ttl
  75. * @return int
  76. */
  77. public function getDuration($ttl): int
  78. {
  79. return $this->duration($ttl);
  80. }
  81. }