Edit File by line
/home/zeestwma/ajeebong.../wp-inclu.../SimplePi.../src/Cache
File: DataCache.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* SimplePie
[3] Fix | Delete
*
[4] Fix | Delete
* A PHP-Based RSS and Atom Feed Framework.
[5] Fix | Delete
* Takes the hard work out of managing a complete RSS/Atom solution.
[6] Fix | Delete
*
[7] Fix | Delete
* Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
[8] Fix | Delete
* All rights reserved.
[9] Fix | Delete
*
[10] Fix | Delete
* Redistribution and use in source and binary forms, with or without modification, are
[11] Fix | Delete
* permitted provided that the following conditions are met:
[12] Fix | Delete
*
[13] Fix | Delete
* * Redistributions of source code must retain the above copyright notice, this list of
[14] Fix | Delete
* conditions and the following disclaimer.
[15] Fix | Delete
*
[16] Fix | Delete
* * Redistributions in binary form must reproduce the above copyright notice, this list
[17] Fix | Delete
* of conditions and the following disclaimer in the documentation and/or other materials
[18] Fix | Delete
* provided with the distribution.
[19] Fix | Delete
*
[20] Fix | Delete
* * Neither the name of the SimplePie Team nor the names of its contributors may be used
[21] Fix | Delete
* to endorse or promote products derived from this software without specific prior
[22] Fix | Delete
* written permission.
[23] Fix | Delete
*
[24] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
[25] Fix | Delete
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
[26] Fix | Delete
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
[27] Fix | Delete
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
[28] Fix | Delete
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
[29] Fix | Delete
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
[30] Fix | Delete
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
[31] Fix | Delete
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
[32] Fix | Delete
* POSSIBILITY OF SUCH DAMAGE.
[33] Fix | Delete
*
[34] Fix | Delete
* @package SimplePie
[35] Fix | Delete
* @copyright 2004-2022 Ryan Parman, Sam Sneddon, Ryan McCue
[36] Fix | Delete
* @author Ryan Parman
[37] Fix | Delete
* @author Sam Sneddon
[38] Fix | Delete
* @author Ryan McCue
[39] Fix | Delete
* @link http://simplepie.org/ SimplePie
[40] Fix | Delete
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
[41] Fix | Delete
*/
[42] Fix | Delete
[43] Fix | Delete
namespace SimplePie\Cache;
[44] Fix | Delete
[45] Fix | Delete
use InvalidArgumentException;
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Subset of PSR-16 Cache client for caching data arrays
[49] Fix | Delete
*
[50] Fix | Delete
* Only get(), set() and delete() methods are used,
[51] Fix | Delete
* but not has(), getMultiple(), setMultiple() or deleteMultiple().
[52] Fix | Delete
*
[53] Fix | Delete
* The methods names must be different, but should be compatible to the
[54] Fix | Delete
* methods of \Psr\SimpleCache\CacheInterface.
[55] Fix | Delete
*
[56] Fix | Delete
* @package SimplePie
[57] Fix | Delete
* @subpackage Caching
[58] Fix | Delete
* @internal
[59] Fix | Delete
*/
[60] Fix | Delete
interface DataCache
[61] Fix | Delete
{
[62] Fix | Delete
/**
[63] Fix | Delete
* Fetches a value from the cache.
[64] Fix | Delete
*
[65] Fix | Delete
* Equivalent to \Psr\SimpleCache\CacheInterface::get()
[66] Fix | Delete
* <code>
[67] Fix | Delete
* public function get(string $key, mixed $default = null): mixed;
[68] Fix | Delete
* </code>
[69] Fix | Delete
*
[70] Fix | Delete
* @param string $key The unique key of this item in the cache.
[71] Fix | Delete
* @param mixed $default Default value to return if the key does not exist.
[72] Fix | Delete
*
[73] Fix | Delete
* @return array|mixed The value of the item from the cache, or $default in case of cache miss.
[74] Fix | Delete
*
[75] Fix | Delete
* @throws InvalidArgumentException
[76] Fix | Delete
* MUST be thrown if the $key string is not a legal value.
[77] Fix | Delete
*/
[78] Fix | Delete
public function get_data(string $key, $default = null);
[79] Fix | Delete
[80] Fix | Delete
/**
[81] Fix | Delete
* Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
[82] Fix | Delete
*
[83] Fix | Delete
* Equivalent to \Psr\SimpleCache\CacheInterface::set()
[84] Fix | Delete
* <code>
[85] Fix | Delete
* public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool;
[86] Fix | Delete
* </code>
[87] Fix | Delete
*
[88] Fix | Delete
* @param string $key The key of the item to store.
[89] Fix | Delete
* @param array $value The value of the item to store, must be serializable.
[90] Fix | Delete
* @param null|int $ttl Optional. The TTL value of this item. If no value is sent and
[91] Fix | Delete
* the driver supports TTL then the library may set a default value
[92] Fix | Delete
* for it or let the driver take care of that.
[93] Fix | Delete
*
[94] Fix | Delete
* @return bool True on success and false on failure.
[95] Fix | Delete
*
[96] Fix | Delete
* @throws InvalidArgumentException
[97] Fix | Delete
* MUST be thrown if the $key string is not a legal value.
[98] Fix | Delete
*/
[99] Fix | Delete
public function set_data(string $key, array $value, ?int $ttl = null): bool;
[100] Fix | Delete
[101] Fix | Delete
/**
[102] Fix | Delete
* Delete an item from the cache by its unique key.
[103] Fix | Delete
*
[104] Fix | Delete
* Equivalent to \Psr\SimpleCache\CacheInterface::delete()
[105] Fix | Delete
* <code>
[106] Fix | Delete
* public function delete(string $key): bool;
[107] Fix | Delete
* </code>
[108] Fix | Delete
*
[109] Fix | Delete
* @param string $key The unique cache key of the item to delete.
[110] Fix | Delete
*
[111] Fix | Delete
* @return bool True if the item was successfully removed. False if there was an error.
[112] Fix | Delete
*
[113] Fix | Delete
* @throws InvalidArgumentException
[114] Fix | Delete
* MUST be thrown if the $key string is not a legal value.
[115] Fix | Delete
*/
[116] Fix | Delete
public function delete_data(string $key): bool;
[117] Fix | Delete
}
[118] Fix | Delete
[119] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function