flightphp/cache 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

flightphp/cache

最新稳定版本:v1.1.0

Composer 安装命令:

composer require flightphp/cache

包简介

Light, simple and standalone PHP in-file caching class

README 文档

README

Light, simple and standalone PHP in-file caching class

Advantages

  • Light, standalone and simple
  • All code in one file - no pointless drivers.
  • Secure - every generated cache file have a php header with die, making direct access impossible even if someone knows the path and your server is not configured properly
  • Well documented and tested
  • Handles concurrency correctly via flock
  • Supports PHP 7.4+
  • Free under a MIT license

Requirements and Installation

You need PHP 7.4+ for usage

Require with composer:

composer require flightphp/cache

Usage

<?php
use flight\Cache;
require_once __DIR__ . "/vendor/autoload.php";

$cache = new Cache();

$data = $cache->refreshIfExpired("simple-cache-test", function () {
    return date("H:i:s"); // return data to be cached
}, 10); // cache for 10 seconds

echo "Latest cache save: $data";

Documentation

See the documentation for full documentation.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固