定制 gueff/cachix 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gueff/cachix

Composer 安装命令:

composer require gueff/cachix

包简介

A simple PHP Caching Class working with files

README 文档

README

A simple PHP Caching Class working with files

Requirements

  • PHP >= 7.4
  • Linux commands rm, find and grep to be executable via PHP's shell_exec command

Installation

create the composer.json file with following content:

{
    "require": {
        "gueff/cachix":"1.0.2"
    }
}

run installation

$ composer install

Usage

<?php

// init Config
\Cachix::init(array(
    'bCaching' => true,
	'sCacheDir' => '/tmp/',
	'iDeleteAfterMinutes' => 10,
	'sBinRemove' => '/bin/rm',
	'sBinFind' => '/usr/bin/find',
	'sBinGrep' => '/bin/grep'
));

// build a Cache-Key
$sKey = 'myCacheKey.Token';

// autodelete cachefiles
// which contain the string ".Token" in key-names
\Cachix::autoDeleteCache('.Token');

// first time saving data to cache...
if (empty(\Cachix::getCache($sKey)))
{
    // Data to be cached
    $aData = ['foo' => 'bar'];
    
    \Cachix::saveCache(
       	$sKey,
     	$aData
    );
}
// ...or read from existing Cache
else
{
    $aData = \Cachix::getCache($sKey);
}

统计信息

  • 总下载量: 3.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2017-12-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固