Home
Classes
tool
DoubleQueueCache
LRUCache
Modules
tool/ajax
get
post
tool/animation
hide
show
slideDown
slideToggle
slideUp
toggle
tool/browser
getBrowserType
getBrowserVersion
tool/drag
tool/fetch
get
post
tool/html
attr
html
text
tool/move
tool/other
tagUsage
tool/selector
children
eq
tool/style
css
setCompatibleStyle
Namespaces
browser
compress
DoubleQueueCache
DoubleQueueCache
双队列缓存 1.当插入新数据时,插入FIFO队列,若数据在FIFO队列中一直未被访问,则最终按FIFO规则淘汰; 2.当数据在FIFO队列中被再次访问,则将数据移到LRU队列头部; 3.当数据在LRU队列中中被再次访问,则将数据迁移到LRU队列头部,若数据在LRU队列中一直未被访问,则最终按LRU规则淘汰; 根据使用频率和时间智能化淘汰,对批量突发图片的缓存污染有良好的防范能力。
Constructor
new DoubleQueueCache
()
Source:
common/cache.mjs
,
line 64