Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.
   1  <?php
   2  
   3  namespace Kevinrob\GuzzleCache\Strategy;
   4  
   5  use Kevinrob\GuzzleCache\CacheEntry;
   6  use Psr\Http\Message\RequestInterface;
   7  use Psr\Http\Message\ResponseInterface;
   8  
   9  class NullCacheStrategy implements CacheStrategyInterface
  10  {
  11  
  12      /**
  13       * @inheritDoc
  14       */
  15      public function fetch(RequestInterface $request)
  16      {
  17          return null;
  18      }
  19  
  20      /**
  21       * @inheritDoc
  22       */
  23      public function cache(RequestInterface $request, ResponseInterface $response)
  24      {
  25          return true;
  26      }
  27  
  28      /**
  29       * @inheritDoc
  30       */
  31      public function update(RequestInterface $request, ResponseInterface $response)
  32      {
  33          return true;
  34      }
  35  
  36      /**
  37       * {@inheritdoc}
  38       */
  39      public function delete(RequestInterface $request)
  40      {
  41          return true;
  42      }
  43  }