Download the PHP package treasure-chest/treasure-chest without Composer

On this page you can find all versions of the php package treasure-chest/treasure-chest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package treasure-chest

TreasureChest

A simple key/value store with namespace support and backends for memcached, apc, filesystem and more.

TreasureChest's biggest feature is namespaces. Most existing key/value stores place your data in a single global environment, this can lead to clashing key names in large datasets. They also don't support wildcards when deleting keys. It's impossible to do something like store('user1_username', 'bob') and then delete('user1_*');. This makes tracking and invalidating large sets of related keys difficult. TreasureChest provides a wrapper around your favourite key/value store (memcached, apc, xcache etc) making this possible.

Internally, TreasureChest uses a pointer which keeps track of the version number of each namespace. This version number is prefixed to all keys which get passed into the class. When a namespace is invalidateed the pointer is incremented by 1, thereby changing the key which gets passed to the datastore.

Requirements

Installation

Use Composer to install the treasure-chest/treasure-chest package. Package details can be found on Packagist.org.

Add the following to your composer.json and run composer install (or composer update).

"require": {
    "treasure-chest/treasure-chest": "0.1.*"
}

Usage

Create an instance of the TreasureChest\Instance class, passing in an instance of the datastore you wish to use.

Use the add, store, fetch, replace, exists, inc, dec and delete methods to store, retrieve and manipulate your data. e.g

Namespaces can be used to logically group sets of key/value pairs. Simply append the key with the desired namespace, separated by a colon (this delimiter character can be changed) e.g

Known issues

There is currently a concurrency issue which can lead to TreasureChest returning data which should have been invalidated. This happens if another PHP process calls invalidate whilst the first process is still running. This could be fixed by checking the namespace version number before each call to fetch, store etc. This has a performance impact so I'll be making it a user enabled option.

To do


All versions of treasure-chest with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package treasure-chest/treasure-chest contains the following files

Loading the files please wait ....