Closed dragoonis closed 12 years ago
Lets grab the top 5 in the list, add them to the cache and set it to expire every hour. This will not cause much server load. One CURL request per hour is fine.
The page is also loaded via ajax, so when the cache does expire, we don't experience any page loading problems.
To get the cache we do
$cache = $this->getService('blog.cache');
This is where that service is defined.
https://github.com/ppi/website/blob/master/modules/BlogModule/Module.php#L38
Examples of using the cache: https://github.com/ppi/website/blob/master/modules/BlogModule/Controller/Blog.php#L49
Please make a class
./modules/BlogModule/Classes/RecentComments,
See how we do things here: https://github.com/ppi/website/tree/master/modules/Application/Classes
Hi @alfrekjv
There isn't a mustache template on the blog/index.html.php file to add it to the blog index.
Adding this. Thanks.
@alfrekjv it's live, previewable here: http://dev.ppi.io/blog
Thanks for the good code! :-)
Our comments are powered by Disqus - so we don't have database access to the comments.
Here's a link to the comments: http://ppiframework.disqus.com/latest.rss