Changeset 59141 for trunk/src/wp-includes/SimplePie/src/Cache/Base.php
- Timestamp:
- 09/30/2024 10:48:16 PM (6 weeks ago)
- Location:
- trunk/src/wp-includes/SimplePie/src
- Files:
-
- 1 added
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/src/Cache/Base.php
r47733 r59141 1 1 <?php 2 2 3 /** 3 4 * SimplePie … … 6 7 * Takes the hard work out of managing a complete RSS/Atom solution. 7 8 * 8 * Copyright (c) 2004-20 16, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors9 * Copyright (c) 2004-2022, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors 9 10 * All rights reserved. 10 11 * … … 42 43 */ 43 44 45 namespace SimplePie\Cache; 46 44 47 /** 45 48 * Base for cache objects 46 49 * 47 * Classes to be used with {@see SimplePie_Cache::register()} are expected50 * Classes to be used with {@see \SimplePie\Cache::register()} are expected 48 51 * to implement this interface. 49 52 * 50 53 * @package SimplePie 51 54 * @subpackage Caching 55 * @deprecated since SimplePie 1.8.0, use "Psr\SimpleCache\CacheInterface" instead 52 56 */ 53 interface SimplePie_Cache_Base57 interface Base 54 58 { 55 56 57 58 59 60 59 /** 60 * Feed cache type 61 * 62 * @var string 63 */ 64 public const TYPE_FEED = 'spc'; 61 65 62 63 64 65 66 67 66 /** 67 * Image cache type 68 * 69 * @var string 70 */ 71 public const TYPE_IMAGE = 'spi'; 68 72 69 70 71 72 73 74 * @param string$type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data75 76 73 /** 74 * Create a new cache object 75 * 76 * @param string $location Location string (from SimplePie::$cache_location) 77 * @param string $name Unique ID for the cache 78 * @param Base::TYPE_FEED|Base::TYPE_IMAGE $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data 79 */ 80 public function __construct($location, $name, $type); 77 81 78 79 80 81 * @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property82 83 84 82 /** 83 * Save data to the cache 84 * 85 * @param array|\SimplePie\SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property 86 * @return bool Successfulness 87 */ 88 public function save($data); 85 89 86 87 88 89 90 91 90 /** 91 * Retrieve the data saved to the cache 92 * 93 * @return array Data for SimplePie::$data 94 */ 95 public function load(); 92 96 93 94 95 96 97 98 97 /** 98 * Retrieve the last modified time for the cache 99 * 100 * @return int Timestamp 101 */ 102 public function mtime(); 99 103 100 101 102 103 104 105 104 /** 105 * Set the last modified time to the current time 106 * 107 * @return bool Success status 108 */ 109 public function touch(); 106 110 107 108 109 110 111 112 111 /** 112 * Remove the cache 113 * 114 * @return bool Success status 115 */ 116 public function unlink(); 113 117 } 118 119 class_alias('SimplePie\Cache\Base', 'SimplePie_Cache_Base');
Note: See TracChangeset
for help on using the changeset viewer.