Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feed Caching? #23

Open
vincent404 opened this issue May 6, 2015 · 2 comments
Open

Feed Caching? #23

vincent404 opened this issue May 6, 2015 · 2 comments

Comments

@vincent404
Copy link
Member

So had a thought, but not quite sure how to do it in OctoberCMS. I know Laravel has some DB caching (and this is for sure an enhancement), but I'm wondering if we should do some caching on the feed end. Not sure how DB intensive the feed generation is, but just a thought as things scale up.

@t2t2
Copy link
Contributor

t2t2 commented May 6, 2015

Since laravel's components are available, part of onRun chunk of code can just be wrapped in if cached get cache else generate block.

$feed = \Cache::remember("crtv-podcast-feed-{$feed_slug}-{$release_type_slug}", $ttl, function() {
     // feed generation code here
    return $feed;
});

@vincent404
Copy link
Member Author

That's what I figured. Just a performance thought for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants