add listener to dynamic creat cahce demo, use jave program method