# optimole-wp/4.2.9/inc/v2/PageProfiler/Storage/Base.php

Optimole – Optimize Images | Convert WebP &amp; AVIF | CDN &amp; Lazy Load | Image Optimization, version 4.2.9. 41 lines.

- Page: https://pluginprobe.com/plugins/optimole-wp/4.2.9/code/inc/v2/PageProfiler/Storage/Base.php
- Raw: https://pluginprobe.com/plugins/optimole-wp/4.2.9/raw/inc/v2/PageProfiler/Storage/Base.php
- Modified: 2025-04-14T10:28:30+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/optimole-wp/4.2.9/code/inc/v2/PageProfiler/Storage/Base.php#L10-L20`.

```php
<?php

namespace OptimoleWP\PageProfiler\Storage;

/**
 * Abstract base class for storage implementations.
 *
 * This class defines the interface for storage operations that concrete
 * implementations must provide.
 */
abstract class Base {

	/**
	 * Store data with the given key.
	 *
	 * @param string $key  The unique identifier for the data.
	 * @param array  $data The data to store.
	 */
	abstract public function store( string $key, array $data );

	/**
	 * Retrieve data by key.
	 *
	 * @param string $key The unique identifier for the data to retrieve.
	 * @return array|false The stored data or null if not found.
	 */
	abstract public function get( string $key );

	/**
	 * Delete data by key.
	 *
	 * @param string $key The unique identifier for the data to delete.
	 */
	abstract public function delete( string $key );

	/**
	 * Delete all stored data.
	 */
	abstract public function delete_all();
}

```
