Ehcache jsonb object retrieving from cache issue

Description

Create ehcache with distribution type “automatic“.

Create function:

function testJsonbEhcache(){ var cacheKey = 'jsonb_test1'; var res = queryExecute('SELECT ''{"a" : "aab"}''::jsonb AS result'); var jsonbCol = res.result[1]; writeDump('before cache'); writeDump(jsonbCol); cachePut(cacheKey, jsonbCol); var cachedval = cacheGet(cacheKey); writeDump('after cache'); writeDump(cachedval); abort; }

 

Expected result (without distribution):

Actual result:

Comes back as a string starting with lucee-serialized:.. (adding as text so people can search for this problem)

Environment

ehcache 2.10.9.2-SNAPSHOT

Attachments

5
  • 24 Apr 2023, 11:43 am
  • 23 Mar 2023, 02:16 pm
  • 23 Mar 2023, 02:16 pm
  • 23 Mar 2023, 10:07 am
  • 23 Mar 2023, 10:07 am

Activity

Oleksandr Zavadskyy 
25 May 2023 at 08:04

installing 2.10.0.36 snapshot fixed the issue. Many thanks

Zac Spitzer 
25 May 2023 at 07:51

Pothys - MitrahSoft 
25 May 2023 at 05:55

I checked this ticket with the ehcache-extension-2.10.0.36-SNAPSHOT file above. When creating EHCache in lucee admin, I enabled "replicate via copy" and "replicate updates via copy" settings, cacheGet() returns a jsonb object. Also after restarting lucee, cacheGet() returns the jsonb object. Issue is solved.

Michael Offner 
24 May 2023 at 14:53

can you please give this a try

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

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 23 March 2023 at 10:07
Updated 7 June 2024 at 16:15
Resolved 25 May 2023 at 08:15