当前位置: 首页>>代码示例>>PHP>>正文


PHP OA_Delivery_Cache_buildFileName函数代码示例

本文整理汇总了PHP中OA_Delivery_Cache_buildFileName函数的典型用法代码示例。如果您正苦于以下问题:PHP OA_Delivery_Cache_buildFileName函数的具体用法?PHP OA_Delivery_Cache_buildFileName怎么用?PHP OA_Delivery_Cache_buildFileName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了OA_Delivery_Cache_buildFileName函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteCacheFile

 /**
  * A function to delete a single cache entry or the entire delivery cache.
  *
  * @param string $name The cache entry name
  * @return bool True if the entres were succesfully deleted
  */
 function deleteCacheFile($name = '')
 {
     if ($name != '') {
         $filename = OA_Delivery_Cache_buildFileName($name);
         return $this->_deleteCacheFile($filename);
     }
     return $this->_deleteAll();
 }
开发者ID:villos,项目名称:tree_admin,代码行数:14,代码来源:DeliveryCacheStore.php

示例2: OA_Delivery_Cache_store

/**
 * A function to store content a cache entry.
 *
 * @param string $name  The cache entry name
 * @param string $cache The cache content
 * @param string $isHash Define if $name is already a cached value or not
 * @param int $expireAt  Define the exact time when cache is expired
 * @return bool True if the entry was succesfully stored
 */
function OA_Delivery_Cache_store($name, $cache, $isHash = false, $expireAt = null)
{
    if ($cache === OA_DELIVERY_CACHE_FUNCTION_ERROR) {
        // Don't store the result to enable permanent caching
        return false;
    }
    $filename = OA_Delivery_Cache_buildFileName($name, $isHash);
    $aCacheVar = array();
    $aCacheVar['cache_contents'] = $cache;
    $aCacheVar['cache_name'] = $name;
    $aCacheVar['cache_time'] = MAX_commonGetTimeNow();
    $aCacheVar['cache_expire'] = $expireAt;
    return OX_Delivery_Common_hook('cacheStore', array($filename, $aCacheVar), $GLOBALS['_MAX']['CONF']['delivery']['cacheStorePlugin']);
}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:23,代码来源:cache.php

示例3: test__deleteAll

 /**
  * A method to test the _deleteAll mathod 
  */
 function test__deleteAll()
 {
     $oPlgOxCacheFile = new Plugins_DeliveryCacheStore_oxCacheFile_oxCacheFile('deliveryCacheStore', 'oxCacheFile', 'oxCacheFile');
     $content = NULL;
     $name = 'test';
     $filename = OA_Delivery_Cache_buildFileName($name);
     $cachefile = $GLOBALS['OA_Delivery_Cache']['path'] . $filename;
     Plugin_deliveryCacheStore_oxCacheFile_oxCacheFile_Delivery_cacheStore($filename, $content);
     $this->assertTrue(file_exists($cachefile));
     $oPlgOxCacheFile->_deleteAll();
     $this->assertFalse(file_exists($cachefile));
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:15,代码来源:DeliveryCacheStoreOxCacheFile.plg.test.php


注:本文中的OA_Delivery_Cache_buildFileName函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。