Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 119 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

GreedyCacheStrategy:: (6 methods):
  __construct()
  getCacheKey()
  cache()
  getCacheObject()
  fetch()
  delete()


Class: GreedyCacheStrategy  - X-Ref

This strategy represents a "greedy" HTTP client.

It can be used to cache responses in spite of any cache related response headers,
but it SHOULDN'T be used unless absolutely necessary, e.g. when accessing
badly designed APIs without Cache control.

Obviously, this follows no RFC :(.
__construct(CacheStorageInterface $cache = null, $defaultTtl, KeyValueHttpHeader $varyHeaders = null)   X-Ref


getCacheKey(RequestInterface $request, KeyValueHttpHeader $varyHeaders = null)   X-Ref
No description

cache(RequestInterface $request, ResponseInterface $response)   X-Ref
No description

getCacheObject(RequestInterface $request, ResponseInterface $response)   X-Ref
No description

fetch(RequestInterface $request)   X-Ref
No description

delete(RequestInterface $request)   X-Ref
{@inheritdoc}