tjdraper/StockPile — pull request #1 by jasonvarga (2014-06-10 13:17:16+00:00)
Title: Replaced $GLOBALS with blink cache

Statamic has a feature called 'Blink'. It is a level of caching that lasts only for the page rendering. It's perfect for a situation like this, where you'd want to share data between different plugin calls. Once the page is loaded, the blink data disappears.

On line 25-26, I simply swapped out the `$GLOBALS` set for the `blink` one.

On line 35-36, I removed the checking you had in place because now it's not necessary.
`$this->blink->get($key)` will return either the requested key if it exists, or `null` if it doesn't. No errors!