cachePut doesn't accept argumentCollection

Description

<cfscript> args = { id = 'test', value = 1 } cachePut( argumentCollection = args ); // cachePut( id = 'test', value = 1 ); https://docs.lucee.org/reference/functions/cacheput.html dump(cacheget('test')); </cfscript>

throws Too few attributes in function [cachePut]

I haven't tested the other cache functions.

Environment

CommandBox on MacOS Catalina

Activity

Show:

Matthew Clemente 19 May 2021 at 14:22

cacheGet also does not accept argumentCollection. It throws: missing required argument [id] for function [cacheget]

cacheIdExists is the same, throwing: missing required argument [id] for function [cacheidexists]

cacheGetAllIds throws a different error: argument [ARGUMENTCOLLECTION] is not allowed for function [cachegetallids]

I haven’t tested all of them, but in my limited testing, it appears that none of the cache functions accept argumentCollection.

Having the flexibility of crafting arguments with argumentCollection with the caching functions would be really helpful.

Pothys - MitrahSoft 18 May 2021 at 06:51

I've checked this ticket with lucee latest version 5.3.8.178-SNAPSHOT. Yes, cachePut() doesn't support the argument collection and throws an error like Too few attributes in function [cachePut]. Seems ACF also throws a Parameter validation error. will decide about this.

Details

Assignee

Reporter

Priority

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

Affects versions

Created 17 May 2021 at 20:47
Updated 19 May 2021 at 14:22

Flag notifications