< Ehcache > <! -- Disk Storage: transfers the objects temporarily not used in the cache to the hard disk, similar to the virtual memory path of Windows System: Specifies the path to store objects on the hard disk --> < Diskstore Path = "Java. Io. tmpdir" /> <! -- Defaultcache: Default cache configuration information. If no special description is added, all objects are processed according to this configuration item maxelementsinmemory: sets the maximum number of record objects to be stored, and the maximum number of record objects is eternal: indicates whether the object never expires. timetoidleseconds: Maximum daze time timetoliveseconds: maximum survival time overflowtodisk: whether to allow the object to be written to the disk --> < Defaultcache Maxelementsinmemory = "10000" Eternal = "False" Timetoidleseconds = "120" Timetoliveseconds = "120" Overflowtodisk = "True" /> <! -- Cache: special configuration name for caching objects with the specified name: full name of the specified object --> < Cache Name = "Com. zbaccp. entity. Person" Maxelementsinmemory = "10000" Eternal = "False" Timetoidleseconds = "300" Timetoliveseconds = "600" Overflowtodisk = "True" /> </ Ehcache >