[
  {
    "path": ".editorconfig",
    "content": "; This file is for unifying the coding style for different editors and IDEs.\n; More information at http://editorconfig.org\n\nroot = true\n\n[*]\ncharset = utf-8\nindent_size = 4\nindent_style = space\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": ".gitattributes",
    "content": "# Path-based git attributes\n# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\n\n# Ignore all test and documentation with \"export-ignore\".\n/.gitattributes     export-ignore\n/.gitignore         export-ignore\n/.travis.yml        export-ignore\n/phpunit.xml.dist   export-ignore\n/.scrutinizer.yml   export-ignore\n/.editorconfig      export-ignore\n/tests              export-ignore\n"
  },
  {
    "path": ".gitignore",
    "content": "build\ncomposer.lock\ndocs\nvendor\n"
  },
  {
    "path": "LICENSE.md",
    "content": "# The MIT License (MIT)\n\nCopyright (c) 2016 PHP Framework Interoperability Group\n\n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "PHP FIG Simple Cache PSR\n========================\n\nThis repository holds all interfaces related to PSR-16.\n\nNote that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details.\n\nYou can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package.\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"psr/simple-cache\",\n    \"description\": \"Common interfaces for simple caching\",\n    \"keywords\": [\"psr\", \"psr-16\", \"cache\", \"simple-cache\", \"caching\"],\n    \"license\": \"MIT\",\n    \"authors\": [\n        {\n            \"name\": \"PHP-FIG\",\n            \"homepage\": \"https://www.php-fig.org/\"\n        }\n    ],\n    \"require\": {\n        \"php\": \">=8.0.0\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"Psr\\\\SimpleCache\\\\\": \"src/\"\n        }\n    },\n    \"extra\": {\n        \"branch-alias\": {\n            \"dev-master\": \"3.0.x-dev\"\n        }\n    }\n}\n"
  },
  {
    "path": "src/CacheException.php",
    "content": "<?php\n\nnamespace Psr\\SimpleCache;\n\n/**\n * Interface used for all types of exceptions thrown by the implementing library.\n */\ninterface CacheException extends \\Throwable\n{\n}\n"
  },
  {
    "path": "src/CacheInterface.php",
    "content": "<?php\n\nnamespace Psr\\SimpleCache;\n\ninterface CacheInterface\n{\n    /**\n     * Fetches a value from the cache.\n     *\n     * @param string $key     The unique key of this item in the cache.\n     * @param mixed  $default Default value to return if the key does not exist.\n     *\n     * @return mixed The value of the item from the cache, or $default in case of cache miss.\n     *\n     * @throws \\Psr\\SimpleCache\\InvalidArgumentException\n     *   MUST be thrown if the $key string is not a legal value.\n     */\n    public function get(string $key, mixed $default = null): mixed;\n\n    /**\n     * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.\n     *\n     * @param string                 $key   The key of the item to store.\n     * @param mixed                  $value The value of the item to store, must be serializable.\n     * @param null|int|\\DateInterval $ttl   Optional. The TTL value of this item. If no value is sent and\n     *                                      the driver supports TTL then the library may set a default value\n     *                                      for it or let the driver take care of that.\n     *\n     * @return bool True on success and false on failure.\n     *\n     * @throws \\Psr\\SimpleCache\\InvalidArgumentException\n     *   MUST be thrown if the $key string is not a legal value.\n     */\n    public function set(string $key, mixed $value, null|int|\\DateInterval $ttl = null): bool;\n\n    /**\n     * Delete an item from the cache by its unique key.\n     *\n     * @param string $key The unique cache key of the item to delete.\n     *\n     * @return bool True if the item was successfully removed. False if there was an error.\n     *\n     * @throws \\Psr\\SimpleCache\\InvalidArgumentException\n     *   MUST be thrown if the $key string is not a legal value.\n     */\n    public function delete(string $key): bool;\n\n    /**\n     * Wipes clean the entire cache's keys.\n     *\n     * @return bool True on success and false on failure.\n     */\n    public function clear(): bool;\n\n    /**\n     * Obtains multiple cache items by their unique keys.\n     *\n     * @param iterable<string> $keys    A list of keys that can be obtained in a single operation.\n     * @param mixed            $default Default value to return for keys that do not exist.\n     *\n     * @return iterable<string, mixed> A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.\n     *\n     * @throws \\Psr\\SimpleCache\\InvalidArgumentException\n     *   MUST be thrown if $keys is neither an array nor a Traversable,\n     *   or if any of the $keys are not a legal value.\n     */\n    public function getMultiple(iterable $keys, mixed $default = null): iterable;\n\n    /**\n     * Persists a set of key => value pairs in the cache, with an optional TTL.\n     *\n     * @param iterable               $values A list of key => value pairs for a multiple-set operation.\n     * @param null|int|\\DateInterval $ttl    Optional. The TTL value of this item. If no value is sent and\n     *                                       the driver supports TTL then the library may set a default value\n     *                                       for it or let the driver take care of that.\n     *\n     * @return bool True on success and false on failure.\n     *\n     * @throws \\Psr\\SimpleCache\\InvalidArgumentException\n     *   MUST be thrown if $values is neither an array nor a Traversable,\n     *   or if any of the $values are not a legal value.\n     */\n    public function setMultiple(iterable $values, null|int|\\DateInterval $ttl = null): bool;\n\n    /**\n     * Deletes multiple cache items in a single operation.\n     *\n     * @param iterable<string> $keys A list of string-based keys to be deleted.\n     *\n     * @return bool True if the items were successfully removed. False if there was an error.\n     *\n     * @throws \\Psr\\SimpleCache\\InvalidArgumentException\n     *   MUST be thrown if $keys is neither an array nor a Traversable,\n     *   or if any of the $keys are not a legal value.\n     */\n    public function deleteMultiple(iterable $keys): bool;\n\n    /**\n     * Determines whether an item is present in the cache.\n     *\n     * NOTE: It is recommended that has() is only to be used for cache warming type purposes\n     * and not to be used within your live applications operations for get/set, as this method\n     * is subject to a race condition where your has() will return true and immediately after,\n     * another script can remove it making the state of your app out of date.\n     *\n     * @param string $key The cache item key.\n     *\n     * @return bool\n     *\n     * @throws \\Psr\\SimpleCache\\InvalidArgumentException\n     *   MUST be thrown if the $key string is not a legal value.\n     */\n    public function has(string $key): bool;\n}\n"
  },
  {
    "path": "src/InvalidArgumentException.php",
    "content": "<?php\n\nnamespace Psr\\SimpleCache;\n\n/**\n * Exception interface for invalid cache arguments.\n *\n * When an invalid argument is passed it must throw an exception which implements\n * this interface\n */\ninterface InvalidArgumentException extends CacheException\n{\n}\n"
  }
]