Download the PHP package noizu-labs/fragmented-keys without Composer

On this page you can find all versions of the php package noizu-labs/fragmented-keys. 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 fragmented-keys

FragmentedKey

tl;dr; A php library for managing cache invalidation by tracking tag-value pair versions on memcache, apc or other storage device and generating derived cache keys based on those values.

For a Java port of this library please see (https://github.com/noizu/fragmented-keys-4java)

Overview

Fragmented Keys provide a straightforward way to manage and invalidate composite cache keys.

It does this by persisting in memcache (or other back-end persistance layer of your choice) tag-instance versionining information. When constructing composite/fragmented keys these tags and their versions are used to generate the final composite key.

Thus if you wanted to tie something to to the granularity of say a specific thing like username you can do the following:

You can then Invalidate only items linked to your user's username by calling:

Behind the scenes this looks something like blocking out everything below the [Targeted User] bucket.

Or you could just go crazy and invalidate all keys that rely on Global.Greating

but amke sure your database is ready for it.

Setup & Installation

Installation

This project is available on composer, just add noizu-labs/fragmented-keys to your required list. "require": { "noizu-labs/fragmented-keys": "dev-master", }

Setup

The code depends on a Memcached, Memcache or APC handle being available and configured along with a global prefix to avoid collisions.

Components

Cache Handlers

Tags

Tags are a logical grouping that you would under certain circumstance invalidate assocaited cached data.

A User:$id pair, a Site:$siteId, etc. This library takes they tag-instance pairs and appends @version fields to them so that when you want to invalidate a large swatch of related items you don't need to send dozens of invalidate requests to memcache, or apc. You just make a single $tag->increment() call and any associated keys that us that tag-instance (User:$userId) will generate new keys;

Tag Class Description
Standard Basic Key. Persists version to specified cache handler
Delayed* Basic Key with built in Delay. Only internal key versions greater than the specified delay will cause a new version to be returned. Allowing you to pull cached content that only updates every hours, 30 seconds, etc.
Constant Key with Constant associated Version. E.g. version can only be set once at construction time. useful for incorporating non version tag-instance details in large composite keys

*Delayed is not yet implemented

Key Rings

Key rings help may your life easier by letting you define common key structures one and then reuse him in your code as needed. You can tweak settings in your config, or even define custom keys that always include some additional tag s with out requiring your cache caller to manually include them!

Example

*The ability to auto include params isnt fully backed into the config process yet but you can emulate it easily by extending the base keyring class and doing the following


All versions of fragmented-keys with dependencies

PHP Build Version
Package Version
Requires pimple/pimple Version ~1.1
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 noizu-labs/fragmented-keys contains the following files

Loading the files please wait ....