As the sun rises and the forest mist clears, and the clouds return and the caves darken, these changes of light and shadow are the morning and evening in the mountains. Wildflowers bloom with their subtle fragrance, fine trees flourish with their dense shade, the wind and frost are pure and clean, and the water recedes to reveal the rocks—these are the four seasons in the mountains. Going out in the morning and returning in the evening, the scenery of the four seasons is different, and the joy is endless.至于负者歌于途,行者休于树,前者呼,后者应,伛偻提携,往来而不绝者,滁人游也。临溪而渔,溪深而鱼肥,酿泉为酒,泉香而酒洌,山肴野蔌,杂然而前陈者,太守宴也。宴酣之乐,非丝非竹,射者中,弈者胜,觥筹交错,起坐而喧哗者,众宾欢也。苍颜白发,颓然乎其间者,太守醉也。 HEX
HEX
Server: Apache
System: Linux webd003.cluster106.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: labeautef (51223)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/labeautef/labeautedegaby.com/wp-content/plugins/polylang/src/cache.php
<?php
/**
 * @package Polylang
 */

/**
 * An extremely simple non persistent cache system.
 *
 * @since 1.7
 *
 * @template TCacheData
 */
class PLL_Cache {
	/**
	 * Current site id.
	 *
	 * @var int
	 */
	protected $blog_id;

	/**
	 * The cache container.
	 *
	 * @var array
	 *
	 * @phpstan-var array<int, array<non-empty-string, TCacheData>>
	 */
	protected $cache = array();

	/**
	 * Constructor.
	 *
	 * @since 1.7
	 */
	public function __construct() {
		$this->blog_id = get_current_blog_id();
		add_action( 'switch_blog', array( $this, 'switch_blog' ) );
	}

	/**
	 * Called when switching blog.
	 *
	 * @since 1.7
	 *
	 * @param int $new_blog_id New blog ID.
	 * @return void
	 */
	public function switch_blog( $new_blog_id ) {
		$this->blog_id = $new_blog_id;
	}

	/**
	 * Adds a value in cache.
	 *
	 * @since 1.7
	 * @since 3.6 Returns the cached value.
	 *
	 * @param string $key  Cache key.
	 * @param mixed  $data The value to add to the cache.
	 * @return mixed
	 *
	 * @phpstan-param non-empty-string $key
	 * @phpstan-param TCacheData $data
	 * @phpstan-return TCacheData
	 */
	public function set( $key, $data ) {
		$this->cache[ $this->blog_id ][ $key ] = $data;

		return $data;
	}

	/**
	 * Returns value from cache.
	 *
	 * @since 1.7
	 *
	 * @param string $key Cache key.
	 * @return mixed
	 *
	 * @phpstan-param non-empty-string $key
	 * @phpstan-return TCacheData|false
	 */
	public function get( $key ) {
		return $this->cache[ $this->blog_id ][ $key ] ?? false;
	}

	/**
	 * Cleans the cache (for this blog only).
	 *
	 * @since 1.7
	 *
	 * @param string $key Optional. Cache key. An empty string to clean the whole cache for the current blog.
	 *                    Default is an empty string.
	 * @return void
	 */
	public function clean( $key = '' ) {
		if ( '' === $key ) {
			unset( $this->cache[ $this->blog_id ] );
		} else {
			unset( $this->cache[ $this->blog_id ][ $key ] );
		}
	}

	/**
	 * Generates and returns a "unique" cache key, depending on `$data` and prefixed by `$prefix`.
	 *
	 * @since 3.6
	 *
	 * @param string              $prefix String to prefix the cache key.
	 * @param string|array|object $data   Data.
	 * @return string
	 *
	 * @phpstan-param non-empty-string $prefix
	 * @phpstan-return non-empty-string
	 */
	public function get_unique_key( string $prefix, $data ): string {
		/** @var scalar */
		$serialized = maybe_serialize( $data );
		return $prefix . md5( (string) $serialized );
	}
}