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

Caching can not work #23

Closed
franzliedke opened this issue Dec 5, 2014 · 1 comment
Closed

Caching can not work #23

franzliedke opened this issue Dec 5, 2014 · 1 comment
Assignees

Comments

@franzliedke
Copy link

I just looked at the code of the repository and discovered code like this:

return $this->cached("$manual.$version.toc",
                Markdown::parse($this->files->get($tocFile), $manual.'/'.$version));

The second argument is passed to Laravel's Cache::remember(). Since it is already evaluated (and therefore called) in this piece of code, there is absolutely no gain in caching this value - in fact, there's a little bit of overhead from storing the value in the cache.

You need to pass a Closure for this to have any effect.

@kaidesu kaidesu self-assigned this Dec 7, 2014
@kaidesu
Copy link
Contributor

kaidesu commented Feb 3, 2015

I removed this from Codex 2.0 (which is using the core package and still in development) - I'm going to leave it up to the developer to implement caching for their own application.

@kaidesu kaidesu closed this as completed Feb 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants