# templately/3.0.4/includes/Utils/Database.php

Templately – Elementor &amp; Gutenberg Template Library: 6500+ Free &amp; Pro Ready Templates And Cloud!, version 3.0.4. 37 lines.

- Page: https://pluginprobe.com/plugins/templately/3.0.4/code/includes/Utils/Database.php
- Raw: https://pluginprobe.com/plugins/templately/3.0.4/raw/includes/Utils/Database.php
- Modified: 2024-01-24T10:10:10+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/templately/3.0.4/code/includes/Utils/Database.php#L10-L20`.

```php
<?php

namespace Templately\Utils;

class Database extends Base {

    /**
     * Set transient to options table
     *
     * @since 2.0.0
     *
     * @param string $key
     * @param mixed $value
     * @param int $expiration
     *
     * @return bool
     */
    public static function set_transient( $key, $value, $expiration = DAY_IN_SECONDS ) {
        $key = '_templately_' . trim( $key );
        return set_transient( $key, $value, $expiration );
    }

    /**
     * Get transient data from options table.
     *
     * @since 2.0.0
     * @param string $key
     *
     * @return mixed
     */
    public static function get_transient( $key ) {
        $key = '_templately_' . trim( $key );
        return get_transient( $key );
    }


}
```
