Stash makes it easy to speed up your code by caching the results of expensive functions or code. Certain actions, like database queries or calls to external APIs, take a lot of time to run but tend to have the same results over short periods of time. This makes it much more efficient to store the results and call them back up later.
Stash functions as a key-value store: you place things into the cache using a key and you retrieve them using the same key.
<?php $item = $pool -> getItem ( 'fruit' ); $pool -> save ( $item -> set ( 'apple' )) var_dump ( $item -> get ()); // string(5) "apple" This works between requests as well.