Code Monkey home page Code Monkey logo

redis-cache's Introduction

RedisCache

License StyleCI Build Status codecov Latest Stable Version HHVM Status

RedisCache is a simple cache library with key namespaces, Redis support, and PSR-6 implementation. To keep it simple, it only provides the simplest interface and brings with no dependencies (except PSR-6 interfaces). Different from other complex and redundant cache libraries, RedisCache is just tiny and powerful.

Features

  • Support both Predis and PhpRedis
  • Support PSR-6
  • Store and manage keys in different namespaces
  • Use with fluent interface
  • Utilize lazy recording for better performance
  • Utilize additional in-memory cache to reduce I/O
  • No dependencies except PSR-6 interfaces

Requirements

  • PHP 5.3 or newer
  • Redis 2.8 or newer

Installation

RedisCache is Composer and PSR-4 ready. To install it, just run the following command:

composer require dyweb/redis-cache

Getting Started

Please check the examples here.

Configuration

Please check the configuration doc.

Development

Contributing

Contributing to this project is highly appreciated through merge requests for new features or bug fixes, bug reporting or just suggestions. Please follow the PSR-2 coding standard when contributing, and ensure that all your contributions are not against our coding style and integrated tests.

Testing

Follow these commands to configure the necessary environment and run checks and tests:

composer install

# run tests
./run-check.sh

The latest version of PHPUnit is recommended for testing.

License

The code for this project is distributed under the terms of the MIT License. (See LICENSE)

redis-cache's People

Contributors

at15 avatar bluemit avatar commouse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redis-cache's Issues

Force using predis in 7 & hhvm

redis.so is not supported by php7 and hhvm

  • detect environment
  • force to use predis. need to find some way to skip the php-redis only tests. Don't know much about current code and test though...

Add php code sniffer

  • chose a psr standard
  • add the code sniffer

use psr-2 and check use phpcs installed via composer, run run-check.sh when develop

Release in packagist

As the basic development is finished, it's time to publish it on packagist and use it in tongqu. Someone need to register a packagist account and release this lib...

@at15 @Bluemit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.