codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.38k stars 1.9k forks source link

Bug: Cache->remember() not implemented but documented. #4922

Closed damianromanowski closed 3 years ago

damianromanowski commented 3 years ago

Describe the bug Documentation at https://codeigniter4.github.io/userguide/libraries/caching.html#remember clearly outlines a remember() method, but is not actually implemented. Throwing Call to undefined method CodeIgniter\Cache\Handlers\FileHandler::remember()

CodeIgniter 4 version 4.0.4

Affected module(s) CodeIgniter\Cache\Handlers\FileHandler

Expected behavior, and steps to reproduce if appropriate

$cache = \Config\Services::cache();

$data = $cache->remember('some_key', 30, function() {
      return 'some data';
});

return $data;

Context

paulbalandan commented 3 years ago

Hi. Cache remember is implemented in v4.0.5