Soft launch of Transient Data
By Adam Patterson in: Announcements
Transient data is a principal borrowed from WordPress.
I have never directly used the Transient Data API but after reading the Docs saw a solid fit for Tentacle.
Transient data offers a simple and standardized way of storing cached data in the database temporarily by giving it a custom name and a timeframe after which it will expire and be deleted.
In this example I am caching an RSS feed, I used CURL to get the XML and covered it to a string ( Because you can not serialize a SimpleXMLElement Object )
$cache->set( 'dashboard', $rss, '+30 minutes' );
$cache->get( 'dashboard' );
In the above example of storing an RSS feed I saw an dramatic improvement in performance.
As you can see the response time is much faster.
ALong with set() and get(), there is look_up(), and delete() soon clear() and flush().