150 likes | 267 Views
This article explores the differences between local and remote caching techniques, emphasizing their applications and efficiency in data retrieval. Local caches eliminate the need for invalidation, making them ideal for lookup tables and straightforward algorithms. In contrast, remote caches require proper invalidation for items, offering more complex algorithmic requirements. We discuss the advantages and use cases of each caching strategy, providing insights into how to effectively manage caches in application development. Get ready to optimize your data handling processes!
E N D
Gostei! Cache Techniques http://www.gostei.com
Simple Cache • Local Cache or Remote Cache • No invalidation needed • Usually good for lookup table • Simple algorithm
RefList • Remote Cache • Invalidation required for the items • Not that simple Algorithm: • Abril.Common.Cache.RefList.*
Abril.Common.Cache.RefList LOCAL CACHE REMOTE CACHE 1 5 9 13 ------ ------ ------ ------ ------ ------ ------ ------ ------ DATABASE 2 6 10 14 3 7 11 15 4 8 12 16 RefList Items
Abril.Common.Cache.RefList ------ ------ ------ LOCAL CACHE ------ ------ ------ REMOTE CACHE 1 5 9 13 ------ ------ ------ ------ ------ ------ ------ ------ ------ DATABASE 2 6 10 14 3 7 11 15 4 8 12 16 RefList Items
Abril.Common.Cache.RefList ------ ------ ------ LOCAL CACHE 6 ------ ------ ------ REMOTE CACHE 6 1 5 9 13 ------ ------ ------ ------ ------ ------ ------ ------ ------ DATABASE 2 6 10 14 3 7 11 15 4 8 12 16 RefList Items
Abril.Common.Cache.RefList ------ ------ ------ LOCAL CACHE 6 3 ------ ------ ------ REMOTE CACHE 6 3 1 5 9 13 ------ ------ ------ ------ ------ ------ ------ ------ ------ DATABASE 2 6 10 14 3 7 11 15 4 8 12 16 RefList Items
Abril.Common.Cache.RefList ------ ------ ------ LOCAL CACHE 6 3 10 11 15 ------ ------ ------ REMOTE CACHE 6 10 3 11 15 1 5 9 13 ------ ------ ------ ------ ------ ------ ------ ------ ------ DATABASE 2 6 10 14 3 7 11 15 4 8 12 16 RefList Items
Abril.Common.Cache.RefList ------ ------ ------ LOCAL CACHE 6 3 10 11 15 ------ ------ ------ REMOTE CACHE 6 10 3 11 15 1 5 9 13 ------ ------ ------ ------ ------ ------ ------ ------ ------ DATABASE 2 6 10 14 3 7 11 15 4 8 12 16 RefList Items
Abril.Common.Cache.RefList ------ ------ ------ LOCAL CACHE 3 11 ------ ------ ------ REMOTE CACHE 10 3 11 15 1 5 9 13 ------ ------ ------ ------ ------ ------ ------ ------ ------ DATABASE 2 6 10 14 3 7 11 15 4 8 12 16 RefList Items
Abril.Common.Cache.RefList ------ ------ ------ LOCAL CACHE 6 3 11 ------ ------ ------ REMOTE CACHE 6 10 3 11 15 1 5 9 13 ------ ------ ------ ------ ------ ------ ------ ------ ------ DATABASE 2 6 10 14 3 7 11 15 4 8 12 16 RefList Items
Tks! :D David Lojudice Sobrinho dsobrinho@abril.com.br http://dalssoft.com