因为引用数据十分稳定,它们被缓存在前端,能基于其ID属性快速定位到它们。
Because the reference data is pretty stable, they are cached at the front end and can be quickly looked up based on their ID properties.
相反地,应该使用内存中的哈希表来缓存数据,并且在会话中保存一个对此数据进行引用的键。
Instead, use an in memory hash table to cache the data and just keep a key to the data in the session.
是否可使用软引用的关键在于,应用程序是否可从大量缓存的数据恢复。
The key to whether a soft reference can be used is whether an application can recover from the loss of the data being cached.
最佳方法就是移除强引用的涉及到的缓存,图片对象,以及其它可以在之后使用时还可以重新创建的数据对象。
The best way to do this is to remove strong references to caches, image objects, and other data objects that can be recreated later.
最佳方法就是移除强引用的涉及到的缓存,图片对象,以及其它可以在之后使用时还可以重新创建的数据对象。
The best way to do this is to remove strong references to caches, image objects, and other data objects that can be recreated later.
应用推荐