Best Practice?: Building a Calendar; Query each day; or by month (using memory)

31 views
Skip to first unread message

Todd Reed

unread,
Aug 28, 2012, 9:29:26 AM8/28/12
to dot...@googlegroups.com
I am working on a new calendar for our website and looking for best practice when it comes to pulling data.  Here are my options

1)  Use Lucene and perform 28-31 queries; one for each day.

2)  Pull one big month query, place it into a content map; then write out the content map.

We will probably have 100+ events per month in our calendar; if it is used like we want it!

Suggestions on which method is better; or another suggestion?  We are running dotCMS 2.0

--Todd

Maria Ahues Bouza

unread,
Aug 28, 2012, 4:31:12 PM8/28/12
to dot...@googlegroups.com
Todd,

Since you're most probably going to be getting all this information from the index and cache I don't think either way is a bad idea.

It would probably be faster to get the one month at once and then print it out but it might be easier to code the page doing the 28-31 queries.

I would do one big query for the entire month, but make sure you use the $dotcontent tool.

-Maria


--Todd

--
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To post to this group, send email to dot...@googlegroups.com.
To unsubscribe from this group, send email to dotcms+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotcms?hl=en.



--
Community Manager

dotCMS
Main: 305.900.2001
Fax: 305.397.2579
www.dotcms.com
http://www.twitter.com/dotCMS
http://www.facebook.com/dotCMS
http://www.twitter.com/mabouza

Please consider the planet before printing this email.

Mark Pitely

unread,
Aug 28, 2012, 4:46:19 PM8/28/12
to dot...@googlegroups.com
Todd,
If you do it as a full month pull, you should be able to use the block cache feature so that the data would really only be pulled once a day, and thereafter wouldn't be slower than pure text.

http://dotcms.com/docs/2.0/CacheHandlingWithTags


Granted, if you want something ajaxy, that might require some more considered thought.

Mark


Reply all
Reply to author
Forward
0 new messages