定制 crodas/memorandum 二次开发

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

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

crodas/memorandum

Composer 安装命令:

composer require crodas/memorandum

包简介

A magic memoization function on steroids

README 文档

README

A magic memoization function on steroids.

Motivation

Memoization stores the results of expensive function calls and returns the cached result when the same inputs occur again.

This library stores the result of a function. If any of the function's argument are files or folders, the result will be deemed as valid until any of those files or folders are either modified or removed.

Any function which involves I/O is destined to be slow, that's why Memorandum speeds up things by processing things only when necessary.

Usage

<?php

$function = memo(function($file) {
    sleep(10);
    return 'cached ouptut:' . $file;
});

$result = $function(__DIR__);
$result = $function(__DIR__);
// The function would be called once, and the output
// will be remembered until a new file is added to __DIR__
// or another file is removed.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-12-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固