承接 cjrasmussen/data-cache-handler 相关项目开发

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

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

cjrasmussen/data-cache-handler

最新稳定版本:1.1.0

Composer 安装命令:

composer require cjrasmussen/data-cache-handler

包简介

Simple helper for caching data

README 文档

README

I've got a handful of scripts that function as notifiers. They run on a schedule and consume RSS feeds or API endpoints or scrape web pages. Then they compare the data retrieved with what was last retrieved and notify me of any changes.

To do that, they need a way of caching whatever "last retrieved" was. This is a simple helper class for doing that. It works for string data and anything that can be JSON encoded/decoded or serialized/unserialized.

Usage

use cjrasmussen\DataCacheHandler\DataCacheHandler;

$dataCacheHelper = new DataCacheHandler('/home/cjrasmussen/scripts/.cache/');

$dataCacheHelper->initialize(__FILE__);

$cache = $dataCache->readSerialized();

$cache[] = 'Some new item to cache';

$dataCacheHelper->writeSerialized();

Installation

Simply add a dependency on cjrasmussen/DataCacheHandler to your composer.json file if you use Composer to manage the dependencies of your project:

composer require cjrasmussen/DataCacheHandler

Although it's recommended to use Composer, you can actually include the file(s) any way you want.

License

DataCacheHandler is MIT licensed.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-10