文件操作 - cache.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/i2kdefense/public_html/wp-content/plugins/ecommerce-product-catalog/ic/cache.php
编辑文件内容
<?php /** * Framework cache helpers. * * @package impleCode\IC */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } if ( function_exists( 'ic_framework_require_once' ) ) { ic_framework_require_once( __DIR__ . '/cache/index.php' ); } else { require_once __DIR__ . '/cache/index.php'; } if ( ! function_exists( 'ic_global_cache' ) ) { /** * Returns the framework global cache helper singleton. * * @return IC_Global_Cache */ function ic_global_cache() { static $cache = null; if ( null === $cache ) { $cache = new IC_Global_Cache(); } return $cache; } } if ( ! function_exists( 'ic_session_cache' ) ) { /** * Returns the framework session cache helper singleton. * * @return IC_Session_Cache */ function ic_session_cache() { static $cache = null; if ( null === $cache ) { $cache = new IC_Session_Cache(); } return $cache; } } if ( ! function_exists( 'ic_transient_cache' ) ) { /** * Returns the framework transient cache helper singleton. * * @return IC_Transient_Cache */ function ic_transient_cache() { static $cache = null; if ( null === $cache ) { $cache = new IC_Transient_Cache(); } return $cache; } } /* * * @version 1.0.0 * @author impleCode * */ if ( ! function_exists( 'ic_get_cache' ) ) { /** * Return a cached framework value. * * @param string|null $name Cache key. * @param bool $hard_cached Whether to read from persistent cache. * * @return mixed * @global array $implecode */ function ic_get_cache( $name = null, $hard_cached = false ) { return ic_global_cache()->get( $name, $hard_cached ); } } if ( ! function_exists( 'ic_delete_cache' ) ) { /** * Delete a cached framework value. * * @param string|null $name Cache key. * * @return void * @global array $implecode */ function ic_delete_cache( $name = null ) { ic_global_cache()->delete( $name ); } } if ( ! function_exists( 'ic_save_cache' ) ) { /** * Save a cached framework value. * * @param string $name Cache key. * @param mixed $value Cache value. * @param bool $hard_cache Whether to save to persistent cache. * @param bool $admin Whether to allow saving in admin context. * * @return bool * @global array $implecode */ function ic_save_cache( $name, $value, $hard_cache = false, $admin = false ) { return ic_global_cache()->set( $name, $value, $hard_cache, $admin ); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件