Caching a variable for a fixed amount of time So I'm at odds with Twitter API which only allows 15 requests per 15 minutes (of course this encourages and promotes good behaviour by not allowing repeated request for the same data).

My task is simply to get the latest tweets for a Drupal based homepage which is easy enough but my question is as follows: is there a native function within the Drupal API to store an array or variable (...my twitter JSON request) for a fixed amount of time?

I recently implemented Twitter caching for a Wordpress site and it was super simple using Wordpress Transients API, see the example here: http://www.codeforest.net/wordpress-transients-api-caching-benchmarks

Is there an alike function in Drupal?
yes there is a native function cache_set

&lt;?php
cache_set('my_module_data', $my_data, 'cache', time() + 360); 
?&gt;


here is a great tutorial about caching in drupal