[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/symfony/http-kernel/HttpCache/ -> Store.php (summary)

(no description)

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

Defines 1 class

Store:: (21 methods):
  __construct()
  cleanup()
  lock()
  unlock()
  isLocked()
  lookup()
  write()
  generateContentDigest()
  invalidate()
  requestsMatch()
  getMetadata()
  purge()
  doPurge()
  load()
  save()
  getPath()
  generateCacheKey()
  getCacheKey()
  persistRequest()
  persistResponse()
  restoreResponse()


Class: Store  - X-Ref

Store implements all the logic for storing cache metadata (Request and Response headers).

__construct($root)   X-Ref

param: string $root The path to the cache directory

cleanup()   X-Ref
Cleanups storage.


lock(Request $request)   X-Ref
Tries to lock the cache for a given Request, without blocking.

return: bool|string true if the lock is acquired, the path to the current lock otherwise

unlock(Request $request)   X-Ref
Releases the lock for the given Request.

return: bool False if the lock file does not exist or cannot be unlocked, true otherwise

isLocked(Request $request)   X-Ref
No description

lookup(Request $request)   X-Ref
Locates a cached Response for the Request provided.

return: Response|null A Response instance, or null if no cache entry was found

write(Request $request, Response $response)   X-Ref
Writes a cache entry to the store for the given Request and Response.

Existing entries are read and any that match the response are removed. This
method calls write with the new list of cache entries.

return: string The key under which the response is stored

generateContentDigest(Response $response)   X-Ref
Returns content digest for $response.

return: string

invalidate(Request $request)   X-Ref
Invalidates all cache entries that match the request.


requestsMatch($vary, $env1, $env2)   X-Ref
Determines whether two Request HTTP header sets are non-varying based on
the vary response header value provided.

param: string $vary A Response vary header
param: array  $env1 A Request HTTP header array
param: array  $env2 A Request HTTP header array
return: bool true if the two environments match, false otherwise

getMetadata($key)   X-Ref
Gets all data associated with the given key.

Use this method only if you know what you are doing.

param: string $key The store key
return: array An array of data associated with the key

purge($url)   X-Ref
Purges data for the given URL.

This method purges both the HTTP and the HTTPS version of the cache entry.

param: string $url A URL
return: bool true if the URL exists with either HTTP or HTTPS scheme and has been purged, false otherwise

doPurge($url)   X-Ref
Purges data for the given URL.

param: string $url A URL
return: bool true if the URL exists and has been purged, false otherwise

load($key)   X-Ref
Loads data for the given key.

param: string $key The store key
return: string|null The data associated with the key

save($key, $data, $overwrite = true)   X-Ref
Save data for the given key.

param: string $key       The store key
param: string $data      The data to store
param: bool   $overwrite Whether existing data should be overwritten
return: bool

getPath($key)   X-Ref
No description

generateCacheKey(Request $request)   X-Ref
Generates a cache key for the given Request.

This method should return a key that must only depend on a
normalized version of the request URI.

If the same URI can have more than one representation, based on some
headers, use a Vary header to indicate them, and each representation will
be stored independently under the same cache key.

return: string A key for the given Request

getCacheKey(Request $request)   X-Ref
Returns a cache key for the given Request.

return: string A key for the given Request

persistRequest(Request $request)   X-Ref
Persists the Request HTTP headers.

return: array An array of HTTP headers

persistResponse(Response $response)   X-Ref
Persists the Response HTTP headers.

return: array An array of HTTP headers

restoreResponse($headers, $path = null)   X-Ref
Restores a Response from the HTTP headers and body.

param: array  $headers An array of HTTP headers for the Response
param: string $path    Path to the Response body
return: Response



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1