# woo-mailerlite/3.1.27/includes/WooMailerLiteCache.php

MailerLite – WooCommerce integration, version 3.1.27. 32 lines.

- Page: https://pluginprobe.com/plugins/woo-mailerlite/3.1.27/code/includes/WooMailerLiteCache.php
- Raw: https://pluginprobe.com/plugins/woo-mailerlite/3.1.27/raw/includes/WooMailerLiteCache.php
- Modified: 2025-08-04T10:38:12+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/woo-mailerlite/3.1.27/code/includes/WooMailerLiteCache.php#L10-L20`.

```php
<?php

class WooMailerLiteCache {

    protected static $cacheKey = "woo_mailerlite_";

    public static function set($key, $data, $seconds)
    {
        set_transient(self::$cacheKey . $key, $data, $seconds);
    }

    public static function get($key, $default = null)
    {
        $data = get_transient(self::$cacheKey . $key);
        if ($data) {
            return $data;
        }
        return $default;
    }

    public static function delete($key)
    {
        return delete_transient(self::$cacheKey . $key);
    }

    public static function pull($key, $default = null)
    {
        $data = self::get(self::$cacheKey . $key, $default);
        self::delete(self::$cacheKey . $key);
        return $data;
    }
}
```
