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

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

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

kozz/static-cache

最新稳定版本:0.1

Composer 安装命令:

composer require kozz/static-cache

包简介

Static Cache

README 文档

README

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version Latest Unstable Version License

Static Cache with Repositories

About

You can use StaticCache as simple cache tool that allows you access cached data from every place of your application during runtime.

It doesn't stores data im memcached or some other data storage, that's just static implementation of Doctrine's ArrayCache

The most powerful idea of this library is Repositories

Repositories

Repository allows you initialize some heavy library once and than it's instance with simple Object-Oriented Style

E.g.: Assume are using Symfony Validator several times during the runtime. That's bad idea initialize it every time in different places of the application so you can easyly create SymfonyValidator Repository:

//SymfonyValidator.php

class SymfonyValidator implements CacheRepositoryInterface
{

  public funcnction getSingleton()
  {
    return Validation::createValidatorBuilder()
      ->enableAnnotationMapping(new CachedReader(new AnnotationReader(), new ArrayCache()))
      ->setMetadataCache(new DoctrineCache(new ArrayCache()))
      ->getValidator();
  }
}

//SomeFile.php use Kozz\Components\Cache\StaticCache

$validator = StaticCache::loadRepository(new SymfonyValidator()); //Validator initialized and saved in cache

//SomeOtherFile.php use Kozz\Components\Cache\StaticCache

$validator = StaticCache::loadRepository(new SymfonyValidator()); //Now validator just loaded from cache


### Reference

Methods

```get($id)``` - get

```set($id, $data)``` - set

```has($id)``` - check

```loadRepository(CacheRepositoryInterface $repository)``` - load Repository

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固