Tagged articles
LRU cache
32 articles · Page 1 of 1
This article explains how LRU cache combines a hash map for O(1) key lookup with a doubly linked list to maintain access order, enabling O(1) get and put operations including eviction of least recently used items, illustrated with step-by-step examples and a complete Python implementation.
AlgorithmCache EvictionData Structures
0 likes · 11 min read

This article analyzes why linked lists often lose to arrays in real-world performance despite theoretical O(1) insertion advantages, exploring CPU cache effects, memory walls, Stroustrup's vector vs list experiments, and scenarios where linked lists still excel in kernels and hybrid structures.
Bjarne StroustrupC++Chandler Carruth
0 likes · 16 min read

This article demonstrates how to build a bounded LRU cache in three lines by extending LinkedHashMap with access-order enabled and overriding removeEldestEntry, detailing the internal doubly-linked list mechanics, thread-safety limitations, memory overhead, and when to migrate to Caffeine for advanced features like TTL and high concurrency.
CaffeineConcurrencyData Structures
0 likes · 22 min read


IT XianyuJul 22, 2026 · Artificial Intelligence
Running an identical LRU‑cache implementation request through GPT‑5.6's three models shows Sol generating 592 tokens with full tests and thread safety, Terra 315 tokens with basic functionality, and Luna only 115 tokens lacking docs and tests, leading to a cost‑benefit analysis that favors Sol for production code despite its higher token price.
AI CodingGPT-5.6LRU cache
0 likes · 7 min read

This article showcases six powerful yet often overlooked Python standard‑library features—pathlib, contextlib, __slots__, functools.lru_cache, generator pipelines, and dataclasses—demonstrating how they simplify code, boost performance, reduce memory usage, and make scripts more maintainable.
LRU cachePython__slots__
0 likes · 11 min read

This article explains why caching is crucial, walks through the classic interview question of implementing an O(1) LRU cache, and provides a complete Python solution using a hash table combined with a doubly linked list, including complexity analysis, common pitfalls, and alternative approaches.
Hash TableLRU cachealgorithm interview
0 likes · 11 min read

In high‑traffic Java applications, massive duplicate error logs hinder troubleshooting; this article introduces a Spring Boot‑based error fingerprint clustering system that generates unique MD5 fingerprints, uses LRU caching, and provides a visual dashboard to intelligently deduplicate, aggregate, and quickly locate root causes, dramatically improving debugging efficiency and reducing storage costs.
Error LoggingFingerprintingJava
0 likes · 11 min read

This article explains the LRU cache eviction strategy, details its O(1) get and put operations using a combined hash table and doubly linked list, and provides a complete Java implementation with step‑by‑step code examples and design rationale.
Hash TableJavaLRU cache
0 likes · 10 min read

This article reveals ten often‑overlooked Python performance techniques—from replacing range(len(...)) with enumerate to leveraging Numba, Polars, and mypyc—providing concrete code examples, profiling commands, and library recommendations that can turn sluggish scripts into lightning‑fast production pipelines.
LRU cachegeneratorsmsgspec
0 likes · 9 min read

Learn how to design and implement an O(1) LRU (Least Recently Used) cache in Java using a combined hash map and doubly linked list, covering algorithm concepts, data structure choices, method details, and complete code with examples and explanations.
AlgorithmJavaLRU cache
0 likes · 10 min read

This article introduces Fabric8 Kubernetes Client's log APIs, demonstrates how to stream pod logs with watchLog, explains periodic log pulling with sinceSeconds, compares three deduplication strategies, and provides Java implementations using LinkedHashMap and LRU caches to reliably process Kubernetes logs.
Fabric8JavaKubernetes
0 likes · 12 min read

This article explains the fundamentals of Python decorators, demonstrates how to leverage the standard library functools module—including wraps, partial, and lru_cache—to build advanced, flexible decorators, and provides concrete timer and partial-function examples with full source code.
LRU cacheTimerdecorators
0 likes · 6 min read

This article introduces Python's functools module, explaining key utilities such as partial functions, lru_cache, update_wrapper, wraps, cmp_to_key, singledispatch, FunctionTool, cache, and partialmethod, and provides practical code examples demonstrating how to create preset request functions, cache results, update signatures, and implement polymorphic behavior.
Code ExamplesLRU cachePython
0 likes · 7 min read

This article explains the importance of caching, compares common replacement policies, and walks through a complete Go implementation of a thread‑safe local LRU cache, including interface design, data structures, linked‑list management, and concurrency handling.
ConcurrencyData StructuresGo
0 likes · 11 min read

Learn how to boost Node.js application performance using the popular lru-cache package, covering the LRU algorithm fundamentals, basic installation and usage, advanced features like peek, fetchMethod, and custom disposal, plus an in‑depth look at its internal Map and doubly‑linked list implementation.
BackendLRU cacheNode.js
0 likes · 9 min read

This article explains the LeetCode LRU Cache problem, detailing the required class interface, operational constraints, and provides a thorough Java solution using a HashMap combined with a doubly linked list to achieve O(1) time complexity for get and put operations.
Data StructuresHashMapJava
0 likes · 10 min read

This article explains how to implement an O(1) LRU cache in Go by combining a hash table with a doubly linked list, detailing the put and get operations, eviction policy, and providing complete, ready‑to‑run source code along with illustrative diagrams.
Cache EvictionData StructuresGo
0 likes · 4 min read

The Map Services SDK unifies Haro and Gaode LBS capabilities into a single component package with full TypeScript declarations and auto‑generated VuePress documentation, adds optimized request strategies with fallback to Gaode, implements an LRU cache for high‑volume reverse‑geocoding, provides a flexible data‑conversion library, and plans online mock‑API documentation to streamline developer integration.
GeoHashLRU cacheMap Services
0 likes · 9 min read

Linux’s Contiguous Memory Allocator (CMA) reserves and manages large physical memory blocks for devices by integrating with the Buddy system, using structures like struct cma, bitmap allocation, and APIs such as cma_init_reserved_mem and cma_alloc, while handling page migration, LRU and per‑CPU PCP caches to ensure efficient allocation and release.
CMAContiguous MemoryLRU cache
0 likes · 15 min read

This article introduces several practical Python decorators—including @lru_cache, @jit, @do_twice, @count_calls, @dataclass, @singleton, @use_unit, and @singledispatch—explaining their purposes, benefits, and providing code examples to demonstrate how they can improve performance, readability, and functionality in Python programs.
LRU cachedataclassperformance
0 likes · 9 min read

This article explains why Vue SSR performance suffers, introduces cache concepts and eviction policies, and walks through a complete, O(1) LRU cache built with JavaScript using a hash map, doubly‑linked list and arrays, complete with code and visual examples.
AlgorithmData StructuresJavaScript
0 likes · 17 min read

This article explains the design and Java implementation of an LRU (Least Recently Used) cache that achieves O(1) time complexity for get and put operations by combining a doubly linked list with a hash map, and provides full source code and usage examples.
JavaLRU cacheO(1)
0 likes · 10 min read

This article introduces Python decorators, explains how they can modify function behavior, and provides practical examples of eight useful decorators—including @lru_cache, @jit, @do_twice, @count_calls, @dataclass, @singleton, @use_unit, and @singledispatch—along with code snippets that demonstrate their implementation and benefits.
Code ExamplesJITLRU cache
0 likes · 10 min read

GooseFS, Tencent Cloud’s distributed caching system for storage‑compute separation, links compute frameworks to underlying storage (COS, CHDFS, COSN) and boosts big‑data and AI workloads by 2‑10× through transparent acceleration, robust master‑worker architecture, Raft‑based HA, tiered caching, and metadata optimizations, delivering up to 50% cost savings and 29% faster compute jobs.
Distributed CachingGooseFSLRU cache
0 likes · 18 min read

Learn how to implement a Least Recently Used (LRU) cache from scratch using a hash map combined with a doubly linked list in Java, covering the core concepts, node structure, get and put operations, and eviction logic to efficiently manage hot data.
Data StructuresHashMapLRU cache
0 likes · 6 min read


政采云技术Nov 30, 2021 · Frontend Development
This article explains the LRU (Least Recently Used) caching mechanism used in Vue's keep-alive component, covering its implementation, performance benefits, and practical usage scenarios.
Component CachingKeep-AliveLRU cache
0 likes · 13 min read

This article walks through a production JVM memory‑leak incident, detailing how a static LRU cache built on LinkedHashMap caused unreclaimed objects, the concurrency pitfalls of its design, and practical steps to diagnose and fix such leaks in Java backend systems.
JVMJava ConcurrencyLRU cache
0 likes · 9 min read

This article explains why Python itself is not slow, demonstrates how to identify bottlenecks with timing and cProfile, and provides a collection of practical tips—such as using built‑in types, lru_cache, local variables, and efficient string formatting—to improve Python program performance by up to 30 percent.
LRU cacheProfilingPython
0 likes · 10 min read

This article explains the LRU (Least Recently Used) caching principle, shows how to build an O(1) LRU cache using a HashMap and doubly linked list in Java, and describes Redis's approximate LRU eviction algorithm based on a global clock and random sampling.
HashMapJavaLRU cache
0 likes · 9 min read

This article explains why technical interviews focus on problem‑solving skills, outlines a four‑step interview approach, introduces the LRU cache eviction policy, analyzes required operations, selects HashMap plus a doubly linked list as the optimal data structures, and provides a complete Java implementation with detailed commentary.
Cache EvictionHashMapInterview
0 likes · 15 min read

This article explains the LRU caching principle, compares naive O(n) implementations, and shows how to achieve true O(1) insert and eviction using a HashMap combined with a doubly linked list, including practical Java code and an overview of Redis's approximate LRU algorithm.
HashMapLRU cacheRedis
0 likes · 12 min read

This article explains Redis's core data structures—string, hash, list, set, and sorted set—covers why and how data expires, details Redis's periodic and lazy expiration mechanisms, outlines the six memory eviction policies, and provides a Java LinkedHashMap‑based LRU cache implementation.
Eviction PoliciesJavaLRU cache
0 likes · 9 min read
