Skip to content

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

Description

@njsx

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!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions