Changeset 60771 for trunk/src/wp-includes/SimplePie/src/Cache/Redis.php
- Timestamp:
- 09/16/2025 10:45:37 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/src/Cache/Redis.php
r59141 r60771 1 1 <?php 2 2 3 /** 4 * SimplePie 5 * 6 * A PHP-Based RSS and Atom Feed Framework. 7 * Takes the hard work out of managing a complete RSS/Atom solution. 8 * 9 * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors 10 * All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without modification, are 13 * permitted provided that the following conditions are met: 14 * 15 * * Redistributions of source code must retain the above copyright notice, this list of 16 * conditions and the following disclaimer. 17 * 18 * * Redistributions in binary form must reproduce the above copyright notice, this list 19 * of conditions and the following disclaimer in the documentation and/or other materials 20 * provided with the distribution. 21 * 22 * * Neither the name of the SimplePie Team nor the names of its contributors may be used 23 * to endorse or promote products derived from this software without specific prior 24 * written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 27 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 28 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS 29 * AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 33 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 34 * POSSIBILITY OF SUCH DAMAGE. 35 * 36 * @package SimplePie 37 * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue 38 * @author Ryan Parman 39 * @author Sam Sneddon 40 * @author Ryan McCue 41 * @link http://simplepie.org/ SimplePie 42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 43 */ 3 // SPDX-FileCopyrightText: 2004-2023 Ryan Parman, Sam Sneddon, Ryan McCue 4 // SPDX-FileCopyrightText: 2015 Jan Kozak <galvani78@gmail.com> 5 // SPDX-License-Identifier: BSD-3-Clause 6 7 declare(strict_types=1); 44 8 45 9 namespace SimplePie\Cache; … … 56 20 * prefixed with `simple_primary-` and data will expire after 3600 seconds 57 21 * 58 * @package SimplePie59 * @subpackage Caching60 22 * @uses Redis 61 23 * @deprecated since SimplePie 1.8.0, use implementation of "Psr\SimpleCache\CacheInterface" instead … … 73 35 * Options 74 36 * 75 * @var array 37 * @var array<string, mixed> 76 38 */ 77 39 protected $options; … … 89 51 * @param string $location Location string (from SimplePie::$cache_location) 90 52 * @param string $name Unique ID for the cache 91 * @param Base::TYPE_FEED|Base::TYPE_IMAGE $typeEither TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data53 * @param Base::TYPE_FEED|Base::TYPE_IMAGE|array<string, mixed>|null $options Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data 92 54 */ 93 public function __construct( $location,$name, $options = null)55 public function __construct(string $location, string $name, $options = null) 94 56 { 95 57 //$this->cache = \flow\simple\cache\Redis::getRedisClientInstance(); … … 119 81 /** 120 82 * @param NativeRedis $cache 83 * @return void 121 84 */ 122 85 public function setRedisClient(NativeRedis $cache) … … 128 91 * Save data to the cache 129 92 * 130 * @param array |\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property93 * @param array<mixed>|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property 131 94 * @return bool Successfulness 132 95 */ … … 147 110 * Retrieve the data saved to the cache 148 111 * 149 * @return array Data for SimplePie::$data112 * @return array<mixed>|false Data for SimplePie::$data 150 113 */ 151 114 public function load() … … 162 125 * Retrieve the last modified time for the cache 163 126 * 164 * @return int Timestamp127 * @return int|false Timestamp 165 128 */ 166 129 public function mtime()
Note: See TracChangeset
for help on using the changeset viewer.