Skip to content

Cache is not working #39

@IvoRabush

Description

@IvoRabush

Installed version: v4.0.1

The cache key is using the encrypt() function which returns every time a different hash string in all the LaravelStrapi class methods,

$cacheKey = self::CACHE_KEY.'.'.__FUNCTION__.'.'.encrypt($endpoint);

The cache::remember always stores in the cache the same request but with a different $cacheKey

Proposal to fix the bug:

  • Using md5: $cacheKey = md5(self::CACHE_KEY . '.' . __FUNCTION__ . '.' . $endpoint);
  • Using sha1: $cacheKey = sha1(self::CACHE_KEY . '.' . __FUNCTION__ . '.' . $endpoint);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions