:::: MENU ::::
Browsing posts in: Stash

Stash is a caching library written in PHP. It’s main purpose is to speed up applications. It does this by allowing developers to store the results of expensive code so they can call that code as little as possible.

Stash separates itself from other libraries with a primary goal- that the developers API remain consistent regardless of what back end caching system is used. Regardless of which back end is selected the developer can be confident that the library will work in the same way and with the same feature sets. This is different from many other libraries where the choice of back end dictates whether certain features, such as group invalidation, are available.

Full documentation for stash can be found at it’s site, StashPHP.com. Stash development is hosted on Github.


Stash v0.14 Released with PSR-6 Support

Release v0.14.1 is a major update to Stash, and quite likely the last line of releases before v1.0.0.

The biggest addition is support for PSR-6. Stash now implements the various interfaces natively, allowing it to be directly injected into PSR-6 compliant libraries.

This did require a few API changes (which prompted some cleanup of deprecated functions), so please make sure to review the release notes.

Stash remains one of the best tested caching libraries out there, and this improved on that significantly. In addition there have been optimizations and improvements in PHP7 support, including behind the scenes switching between the APC and APCu functions.

The Symfony Stash Bundle has also been updated, with version v0.6.1 utilizing the Stash v0.14 line.


New Release of Stash and Stash Bundle

Stash 0.13.1

  • Dropped support for PHP 5.3.
  • Updated dependencies.
  • Removed various PHP warnings (exceptions are still thrown where needed).
  • Various optimizations, such as reduced function calls during repeated operations.
  • Added “isPersistent” method to driver classes.

Stash Bundle v0.5.1

  • Dropped support for PHP 5.3.
  • Added ‘logger’ config parameter to caches so that they may be injected when each cache is created.
  • Compatibility updates for our upstream projects.

Stash v0.12.2 Released

This backwards compatible release contains a number of feature and stability improvements.

  • On the HHVM front a nasty regression with APCIterator was resolved, continuing the commitment to HHVM compatibility.
  • The Filesystem driver was given an alternative format, JSON, for systems where the native PHP was not optimal. This driver also saw signicant performance improvements related to the clearing functions.
  • The Redis driver was given additional tests, improved error handling, and better support for persistent connections.
  • Memcached also received improvements around it’s use of persistent connections, as well as support for the AWS autodiscovery feature.

In addition to those points there were a few minor bug fixes as well as some readability related code improvements.

Special Thanks to Steve Clay, Paul Scott, Matthias Kreft, Ben Clark and Giuseppe Roberti for their contributions to this release!



Major Stash and StashBundle Updates

For the last two months there has been a lot of development on Stash and the Symfony StashBundle, culminating in the release of Stash 0.12 and Stash Bundle v0.4.

It’s hard to stress how much work went into these two releases. For Stash there was 139 commits and the Stash Bundle itself had another 103. Much of this was internal changes designed to improve performance and ease future development, but there are also a lot of goodies that you’ll want to start exploring.

New Documentation Site and Github Organization

Stash and the Stash Bundle have both been moved out of my personal Github account and over to a new organization. At the same time we’re launching a brand new site, StashPHP.com, for all of the Stash documentation. A special thanks to the folks at the Guzzle project for releasing their Sphinx theme to the public, as that was the basis for the new site.

Full Support for HHVM

This latest release is the first to commit to supporting HHVM. Every new change will be tested against both the stable HHVM and the nightly builds, and any problems that come up will be resolved before being released.

Namespaces!

Stash has already has great support for grouping cached items together using Stacks, and with this latest release it adds Namespaces to the mix. These features are redesigned to work together, allowing each namespace to contain it’s own completely independent groups of items.

For more information on how to use these features in your project check out the Groupings documentation on the Stash site.

Public API Additions

Besides the Namespace features there are a few new public functions available. The DriversList class has been expanded to allow more data to be pulled out about what drivers are available on the system as well as making it possible to register custom drivers. The Item class also contains new functions which pull out metadata about when an Item was first created and when it is expected to expire.

Intensely Expanded Test Suites

Testing is by far one of the most important parts of the Stash library. Stash’s test suite contains 162 tests and over 4,200 assertions, which act to make sure that all drivers behave in a consistent manner and that all data that goes into Stash comes out as it should.

The StashBundle had not, until this point, been tested nearly as thoroughly. That has changed with this update, and the StashBundle now has 98% code coverage, with 94 tests and 834 different assertions.

Major Rewrite and Expansion of Documentation

All of the documentation has been reviewed and updated, including the PHPDoc and inline commenting. New sections have been added to help people Extend Stash for their purposes, Add New Drivers for systems not currently supported, and to Integrate Stash into their projects.

Lots of Little Things

Although a lot of big things have been mentioned, there’s numerous smaller changes that help make Stash better. For more information as well as a list of all potential BC breaks please check out the Changelogs for Stash and StashBundle.


Stash v0.11.6: Opcode Cache Bugfix

This release of Stash deals with changes between the APC and Opcode Caching system in PHP 5.4, specifically how opcode caches get invalidated. As of this release the Filesystem Driver explicitly invalidates the opcode cache for the files it creates or updates, preventing PHP from including an older version of it’s data.

The new release is available via Github and Packagist.


Stash reaches 40k Downloads through Packagist!

As I was poking around the Packagist website this morning I found that Stash has reached 40k downloads through composer! What’s really exciting is that 2,135 of those downloads were just in the last 10 days.

This is an exciting milestone for me. Stash has been in active development since 2009, but was only moved to Github 2 years ago- around the time that it was made available through Packagist. Since then the community has rallied behind it- with 23 different contributors, a fork supporting PHP 5.2, bundles for popular frameworks like Symfony (thanks Josh!), and adoption of projects like EZPublish, the growth of this project has been phenomenal.

Thanks to all of the community for their help in developing Stash! I’m looking forward to my next update on Stash, where I’ll talk a bit more about what makes it such a great caching library.