承接 gregoriohc/static-cache 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

gregoriohc/static-cache

Composer 安装命令:

composer require gregoriohc/static-cache

包简介

PHP simple static cache class

README 文档

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

PHP simple static cache class

Install

Via Composer

$ composer require gregoriohc/static-cache

Usage

Checking for item existence

if (Cache::has('key')) {
    // ...
}

Storing item

Cache::set('key', 'value');

Retrieving item

$value = Cache::get('key');

If you wish, you may pass a second argument to the get method specifying the default value you wish to be returned if the item doesn't exist:

$value = Cache::get('key', 'default');

You may even pass a Closure as the default value. The result of the Closure will be returned if the specified item does not exist in the cache:

Cache::get('key', function() {
    return 'value';
});

Retrieve and store item

Sometimes you may wish to retrieve an item from the cache, but also store a default value if the requested item doesn't exist. You may do this using the remember method:

Cache::remember('key', function() {
    return 'value';
});

If the item does not exist in the cache, the Closure passed to the remember method will be executed and its result will be placed in the cache.

Removing item

Cache::forget('key');

Testing

$ composer test

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email gregoriohc@gmail.com instead of using the issue tracker.

Socialware

You're free to use this package, but if it makes it to your production environment I highly appreciate you sharing it on any social network.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固