PHPackages                             havvg/propel-uniquekey-instancepooling-behavior - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. havvg/propel-uniquekey-instancepooling-behavior

ActiveLibrary[Caching](/categories/caching)

havvg/propel-uniquekey-instancepooling-behavior
===============================================

The UniqueKeyInstancePoolingBehaviors adds additional instance pooling to findOne query methods operating on unique keys.

v0.9.2(13y ago)058MITPHP

Since Jan 31Pushed 13y ago1 watchersCompare

[ Source](https://github.com/havvg/UniqueKeyInstancePoolingBehavior)[ Packagist](https://packagist.org/packages/havvg/propel-uniquekey-instancepooling-behavior)[ RSS](/packages/havvg-propel-uniquekey-instancepooling-behavior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

UniqueKeyInstancePoolingBehavior
================================

[](#uniquekeyinstancepoolingbehavior)

[![Build Status](https://camo.githubusercontent.com/1c5e5f1e0eb3b1478e07e107702452e97bf1b1dcd848a919c99b4ea5df02ad1b/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f68617676672f556e697175654b6579496e7374616e6365506f6f6c696e674265686176696f722e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/havvg/UniqueKeyInstancePoolingBehavior)

See the Propel documentation on how to [install a third party behavior](http://propelorm.org/documentation/07-behaviors.html#using_thirdparty_behaviors)

Usage
-----

[](#usage)

Just add the following XML tag in your `schema.xml` file:

```

```

For example:

```

```

The behavior will add two methods for each unique key:

1. A static key generator; from the example this would be `createUniquePoolingKeyForEmail`. This method returns the key used when accessing the instances pool.
2. The `findOneByEmail` method will be actually implemented. This method wraps the original method around instance pooling.

```
