Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 01 Jun 2010, 20:07
Yellow Slider Yellow Slider is offline
 
Join Date: Aug 2006
What is the best way to fetch the 'x' latest articles in the CMS?

I'm building a widget that will diaplay the 'x' latest articles on the forumhome.
for every article I need the following information -
  • title
  • url
  • preview text
  • one of the attachments (will be displayed)
  • STAMP (for the date)

I'm going to use the datastore and a cron that will build the datastore every 10 min' to update the information, so there won't be any "heavy" queries on the front page for every refresh, just fetching data from the datastore (is there a better solution?)

is there a manual of how I should use the datastore in vB4?

I'll be happy to hear your solution for that.
Reply With Quote
  #2  
Old 03 Jun 2010, 15:40
Carnage Carnage is offline
 
Join Date: Jan 2005
If you are making a forum block, the output is cached automatically.

I don't recall how to do this off the top of my head, but its also possible to use the vb_cache object to store your data. You can then listen for certain events which will automatically clear the cache (eg when a new article is posted)
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 01:50.

Layout Options | Width: Wide Color: