# desktop-mode/1.1.8/includes/framework/app/wordpress/class-cache.php

OpenStation: Desktop Windows, Dock &amp; Virtual Desktops for WP Admin, version 1.1.8. 42 lines.

- Page: https://pluginprobe.com/plugins/desktop-mode/1.1.8/code/includes/framework/app/wordpress/class-cache.php
- Raw: https://pluginprobe.com/plugins/desktop-mode/1.1.8/raw/includes/framework/app/wordpress/class-cache.php
- Modified: 2026-09-04T15:30:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/desktop-mode/1.1.8/code/includes/framework/app/wordpress/class-cache.php#L10-L20`.

```php
<?php
/**
 * OpenStation App Framework — WordPress Cache adapter.
 *
 * Backed by the object cache under one group. Without a persistent
 * object cache drop-in this only lives for the request, which is
 * exactly the contract: a miss is always safe.
 *
 * @package OpenStation
 */

namespace OpenStation\App\WordPress;

use OpenStation\App\Contracts\Cache as CacheContract;

defined( 'ABSPATH' ) || exit;

/**
 * Object-cache backed cache.
 */
final class Cache implements CacheContract {

	const GROUP = 'openstation_apps';

	/** {@inheritDoc} */
	public function get( $key, $fallback = null ) {
		$found = false;
		$value = wp_cache_get( (string) $key, self::GROUP, false, $found );
		return $found ? $value : $fallback;
	}

	/** {@inheritDoc} */
	public function set( $key, $value, $ttl = 0 ) {
		wp_cache_set( (string) $key, $value, self::GROUP, max( 0, (int) $ttl ) );
	}

	/** {@inheritDoc} */
	public function delete( $key ) {
		wp_cache_delete( (string) $key, self::GROUP );
	}
}

```
