cacheGetAll() does not return all elements within the cache

Description

according to the documentation of cacheGetAll() - "this function return a structure containing all elements inside the cache." The documentation further states that both filter and region are optional. However, if a region is not specified only the items within the default region are returned.

Intuitively this method should return a structure of structures in the form of [region][key][value]

test case:

<cfscript>
cachePut(id='abc',value='123');
cachePut(id='def',value='123');
CacheRegionNew("foo");
cachePut(id='foo-abc',value='123',region="foo");
cachePut(id='foo-def',value='123',region="foo");
writeDump(cachegetall()); //returns only from default
writeDump(cachegetall(region='foo'));
</cfscript>

Environment

None

Activity

Show:

Gary Gilbert 10 May 2019 at 15:26

ps yes I did see the description for cachename argument (“definition of the cache used by name, when not set the "default Object Cache" defined in Lucee Administrator is used instead.”). I guess we could call this a feature wish

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 10 May 2019 at 14:08
Updated 19 May 2021 at 11:19