# depicter/trunk/vendor/averta/wordpress/src/Cache/DatabaseCache.php

Depicter — Popup &amp; Slider Builder, version trunk. 56 lines.

- Page: https://pluginprobe.com/plugins/depicter/trunk/code/vendor/averta/wordpress/src/Cache/DatabaseCache.php
- Raw: https://pluginprobe.com/plugins/depicter/trunk/raw/vendor/averta/wordpress/src/Cache/DatabaseCache.php
- Modified: 2022-06-01T06:26:20+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/depicter/trunk/code/vendor/averta/wordpress/src/Cache/DatabaseCache.php#L10-L20`.

```php
<?php
namespace Averta\WordPress\Cache;


class DatabaseCache extends WPCache {

	/**
	 * {@inheritDoc}
	 */
	public function get( $key, $default = false ) {
		global $_wp_using_ext_object_cache;

		$current_using_cache = $_wp_using_ext_object_cache;
		$_wp_using_ext_object_cache = false;

		$result = parent::get( $key, $default );

		$_wp_using_ext_object_cache = $current_using_cache;

		return $result;
	}

	/**
	 * {@inheritDoc}
	 */
	public function set( $key, $value, $ttl = null ): bool {
		global $_wp_using_ext_object_cache;

		$current_using_cache = $_wp_using_ext_object_cache;
		$_wp_using_ext_object_cache = false;

		$result = parent::set( $key, $value, $ttl );

		$_wp_using_ext_object_cache = $current_using_cache;

		return $result;
	}

	/**
	 * {@inheritDoc}
	 */
	public function delete( $key ): bool {
		global $_wp_using_ext_object_cache;

		$current_using_cache = $_wp_using_ext_object_cache;
		$_wp_using_ext_object_cache = false;

		$result = parent::delete( $key );

		$_wp_using_ext_object_cache = $current_using_cache;

		return $result;
	}

}

```
