Skip to content
This repository was archived by the owner on Oct 3, 2022. It is now read-only.
This repository was archived by the owner on Oct 3, 2022. It is now read-only.

Error creating caches with a TTL #48

@igmar

Description

@igmar

This works :

JCacheConfiguration jCacheConfiguration = new JCacheConfiguration(null, null, null, null);
cache = cacheManager.createCache(this.name, jCacheConfiguration);

while this gives me a NPE :

CacheConfiguration cacheConfiguration = new CacheConfiguration();
cacheConfiguration.setTimeToLiveSeconds(NO_EXPIRE);
cacheConfiguration.setTimeToIdleSeconds(NO_EXPIRE);
JCacheConfiguration jCacheConfiguration = new JCacheConfiguration(cacheConfiguration);
cache = cacheManager.createCache(this.name, jCacheConfiguration);

where NO_EXPIRE is equal to 60 * 60 * 24 * 365 * 10

The only difference I see on code paths is that the second doesn't set an expire factory, while the first path does.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions