定制 rjz1371/urncache 二次开发

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

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

rjz1371/urncache

Composer 安装命令:

composer create-project rjz1371/urncache

包简介

Laravel UrnCache provides a cache system with grouping ability.

README 文档

README

Build Status Total Downloads Latest Stable Version License

About UrnCache

Laravel UrnCache provides a cache system with grouping ability.

Quick Start

installation

composer require rjz1371/urncache
composer update

namespace

use rjz1371\UrnCache\UrnCache;

Put cache data without expire time ( forever cache ).

$key = 'my-cache-key';
$value = [
    ['username' => 'rjz1371', 'age' => 25],
    ['username' => 'reza', 'age' => 20],
    ['username' => 'alex', 'age' => 56]
];
$group = 'users';
UrnCache::put($key, $value, $group);

Put cache data with expire time ( expire after 1 hour ).

$key = 'my-cache-key';
$value = [
    ['username' => 'rjz1371', 'age' => 25],
    ['username' => 'reza', 'age' => 20],
    ['username' => 'alex', 'age' => 56]
];
$group = 'users';
UrnCache::put($key, $value, $group, 3600);

Checking cache exists or not ( $result is true or false ).

$key = 'my-cache-key';
$group = 'users';
$result = UrnCache::has($key, $group);

Retrive cache data.

$key = 'my-cache-key';
$group = 'users';
$result = UrnCache::get($key, $group);

Delete cache.

$key = 'my-cache-key';
$group = 'users';
UrnCache::delete($key, $group);

Delete all cache in special group.

$group = 'users';
UrnCache::deleteByGroup($group);

Delete all cache.

UrnCache::deleteAll();

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固