phalcon/cphalcon — pull request #1093 by sjinks (2013-08-15 19:06:01+00:00)
Title: Cache Optimization + bug fixes

In brief:
* **before**: 80,098 allocs, 80,073 frees, 50,238,672 bytes allocated
* **after**: 79,686 allocs, 79,661 frees, 15,219,256 bytes allocated

Tested with

```bash
USE_ZEND_ALLOC=0 valgrind $(phpenv which php) unit-tests/manual-unit.php CacheTest.php CacheTest
```

Bug fixes:
* 6c37bad: looks like it is not always safe to store zval** as references to properties in PHP 5.4+ (zval** points to the location where the property is stored and the properties sometimes migrate); this will probably fix the bug with crashing session bag
* c46c766 implements Phalcon\Cache\Backend\Memory::queryKeys()
* 00f2177 adds checks to phalcon_call_XXX to ensure that all arguments are `zval*`'s
* e69c7ba fixes bugs in Libmemcached that crippled past the review