---
name: "Text::MicroMason::Cache::Simple"
section: "3pm"
platform: "linux"
package: "libtext-micromason-perl"
version: "2.23-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Text::MicroMason::Cache::Simple"
---

# Text::MicroMason::Cache::Simple(3pm)

Basic Cache with Minimal Interface

## NAME

Text::MicroMason::Cache::Simple - Basic Cache with Minimal Interface

## DESCRIPTION

This trivial cache class just stores values in a hash.

It does not perform any of the following functions: expiration, cache size limiting, flatening of complex keys, or deep copying of complex values.

### Public Methods

- **new()**

  ```
    $cache = Text::MicroMason::Cache::Simple->new();
  ```

- **get()**

  ```
    $value = $cache->get( $key );
  ```

  Retrieves the value associated with this key, or undef if there is no value.

- **set()**

  ```
    $cache->set( $key, $value );
  ```

  Stores the provided value in association with this key.

- **clear()**

  ```
    $cache->clear();
  ```

  Removes all data from the cache.

## SEE ALSO

For uses of this cache class, see Text::MicroMason::CompileCache.

Additional cache classes are available in the Text::MicroMason::Cache:: namespace, or select other caching modules on CPAN that support the interface described in Cache::Cache.

For distribution, installation, support, copyright and license  information, see Text::MicroMason::Docs::ReadMe.
