How to create JCS cache regions at runtime?

284 Views Asked by At

Can anybody tell me how to create a JCS cache region at run-time ?

1

There are 1 best solutions below

0
On BEST ANSWER
JCS jcs = JCS.getInstance("REGION");
IElementAttributes attr = new ElementAttributes();
attr.setIsEternal(false);
attr.setMaxLifeSeconds( maxLife );
jcs.put("Key",data, attr);