Skip to content

Cache

Used to create cache objects

This class can be overloaded with {@see \SimplePie\SimplePie::set_cache_class()}, although the preferred way is to create your own handler via {@see \SimplePie\register()}

  • Full name: \SimplePie\Cache
  • Warning: this class is deprecated. This means that this class will likely be removed in a future version.

Properties

handlers

Cache handler classes

protected static array $handlers

These receive 3 parameters to their constructor, as documented in {@see \SimplePie\register()}

  • This property is static.

Methods

__construct

Don't call the constructor. Please.

private __construct(): mixed

get_handler

Create a new SimplePie\Cache object

public static get_handler(string $location, string $filename, \SimplePie\Cache\Base::TYPE_FEED|\SimplePie\Cache\Base::TYPE_IMAGE $extension): \SimplePie\Cache\Base
  • This method is static.

Parameters:

Parameter Type Description
$location string URL location (scheme is used to determine handler)
$filename string Unique identifier for cache object
$extension \SimplePie\Cache\Base::TYPE_FEED|\SimplePie\Cache\Base::TYPE_IMAGE 'spi' or 'spc'

Return Value:

Type of object depends on scheme of $location


create

Create a new SimplePie\Cache object

public create(mixed $location, mixed $filename, mixed $extension): mixed
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

Parameters:

Parameter Type Description
$location mixed
$filename mixed
$extension mixed

register

Register a handler

public static register(string $type, class-string<\SimplePie\Cache\Base> $class): mixed
  • This method is static.

Parameters:

Parameter Type Description
$type string DSN type to register for
$class class-string<\SimplePie\Cache\Base> Name of handler class. Must implement Base

parse_URL

Parse a URL into an array

public static parse_URL(string $url): array
  • This method is static.

Parameters:

Parameter Type Description
$url string


Automatically generated on 2025-03-18