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

Bug: Cell Caching in View Cells and SOLVE! #2821

Closed
njsx opened this issue Apr 12, 2020 · 1 comment · Fixed by #2851
Closed

Bug: Cell Caching in View Cells and SOLVE! #2821

njsx opened this issue Apr 12, 2020 · 1 comment · Fixed by #2851
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@njsx
Copy link

njsx commented Apr 12, 2020

Quote from UserGuide in section about View Cells:

You can cache the results of the view cell call by passing the number of seconds to cache the data for as the third parameter.

And example:

<?= view_cell('\App\Libraries\Blog::recentPosts', 'limit=5', 300) ?>

This is variant is does not work! Cache file does not creating!

BUT! This variant is WORK if I pass the fourth argument with the file name! Thus, in version 4.0.2 I must always pass the file name!

The problem in file system/Views/Cell.php in line:

list($class, $method) = $this->determineClass($library);

// Is it cached?

$cacheName = ! empty($cacheName) ? $cacheName : $class . $method . md5(serialize($params));

if I change on:

$cacheName = ! empty($cacheName) ? $cacheName : md5(serialize($params));

It's WORK!

@njsx njsx added the bug Verified issues on the current code behavior or pull requests that will fix them label Apr 12, 2020
@njsx
Copy link
Author

njsx commented Apr 12, 2020

Oh, I realized what the problem is! The problem is that on the Windows operating system it is impossible to create files and folders containing the characters / and \ that are present when specifying the namespace!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant