vb already has a cache class which deals with caching; the best way would be to figure out how that works, cache your widget in that and expire it every 5 mins with a cron job or the class may even do it automatically for you.
This means that your mod would be portable, if someone is using memcached for their cache, it'll use that, if someone is using the database, it'll use that.
|