Tag

lru-cache

0 views collected around this technical thread.

Python Programming Learning Circle
Python Programming Learning Circle
Sep 11, 2024 · Fundamentals

Using Python's functools Module to Build Advanced Decorators

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.

PythonTimerdecorators
0 likes · 6 min read
Using Python's functools Module to Build Advanced Decorators
Test Development Learning Exchange
Test Development Learning Exchange
Aug 27, 2024 · Fundamentals

An Introduction to Python's functools Module and Its Common Utilities

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 examplesdecoratorsfunctools
0 likes · 7 min read
An Introduction to Python's functools Module and Its Common Utilities
Code Mala Tang
Code Mala Tang
Jun 18, 2024 · Backend Development

Master Node.js Caching with lru-cache: From Basics to Advanced Techniques

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.

JavaScriptNode.jsbackend
0 likes · 9 min read
Master Node.js Caching with lru-cache: From Basics to Advanced Techniques
IT Services Circle
IT Services Circle
Mar 12, 2024 · Fundamentals

LRU Cache Design and Java Implementation with O(1) Operations

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 StructuresDoubly Linked ListHashMap
0 likes · 10 min read
LRU Cache Design and Java Implementation with O(1) Operations
HelloTech
HelloTech
Jul 17, 2023 · Backend Development

Map Services SDK and Caching Strategies

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.

GeoHashSDKcaching
0 likes · 9 min read
Map Services SDK and Caching Strategies
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Mar 10, 2023 · Fundamentals

CMA (Contiguous Memory Allocator) Technical Principle Analysis and Source Code Interpretation

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.

Buddy SystemCMAContiguous Memory
0 likes · 15 min read
CMA (Contiguous Memory Allocator) Technical Principle Analysis and Source Code Interpretation
Python Programming Learning Circle
Python Programming Learning Circle
Mar 6, 2023 · Fundamentals

A Guide to Useful Python Decorators

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.

Pythondataclasslru-cache
0 likes · 9 min read
A Guide to Useful Python Decorators
Architect's Guide
Architect's Guide
Sep 10, 2022 · Fundamentals

Java Implementation of an O(1) LRU Cache Using a Doubly Linked List and HashMap

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.

Data StructureJavaO(1)
0 likes · 10 min read
Java Implementation of an O(1) LRU Cache Using a Doubly Linked List and HashMap
Python Programming Learning Circle
Python Programming Learning Circle
Aug 16, 2022 · Fundamentals

Exploring Useful Python Decorators: @lru_cache, @jit, @do_twice, @count_calls, @dataclass, @singleton, @use_unit, @singledispatch

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.

JITcode examplesdataclass
0 likes · 10 min read
Exploring Useful Python Decorators: @lru_cache, @jit, @do_twice, @count_calls, @dataclass, @singleton, @use_unit, @singledispatch
Tencent Cloud Developer
Tencent Cloud Developer
Feb 28, 2022 · Big Data

GooseFS: Distributed Caching System for Storage-Compute Separation Architecture

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.

GooseFSMetadata OptimizationRaft consensus
0 likes · 18 min read
GooseFS: Distributed Caching System for Storage-Compute Separation Architecture
Sanyou's Java Diary
Sanyou's Java Diary
Feb 16, 2022 · Fundamentals

Mastering LRU Cache: Hand‑Write a Least Recently Used Algorithm in Java

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 StructuresDoubly Linked ListHashMap
0 likes · 6 min read
Mastering LRU Cache: Hand‑Write a Least Recently Used Algorithm in Java
政采云技术
政采云技术
Nov 30, 2021 · Frontend Development

LRU Cache Implementation in Vue Keep-Alive Component

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 CachingJavaScriptVue.js
0 likes · 13 min read
LRU Cache Implementation in Vue Keep-Alive Component
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 4, 2021 · Backend Development

Analyzing a JVM Memory Leak Caused by a Custom LRU Cache Implementation

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 ConcurrencyLinkedHashMap
0 likes · 9 min read
Analyzing a JVM Memory Leak Caused by a Custom LRU Cache Implementation
Python Programming Learning Circle
Python Programming Learning Circle
Apr 28, 2021 · Fundamentals

How to Speed Up Python Programs: Profiling, Timing, and Practical Optimization Techniques

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.

OptimizationPythonTiming
0 likes · 10 min read
How to Speed Up Python Programs: Profiling, Timing, and Practical Optimization Techniques
Selected Java Interview Questions
Selected Java Interview Questions
Apr 6, 2021 · Fundamentals

Understanding LRU Cache and Its Implementation in Java and Redis

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.

Doubly Linked ListHashMapJava
0 likes · 9 min read
Understanding LRU Cache and Its Implementation in Java and Redis
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 3, 2020 · Fundamentals

Understanding LRU Cache: Interview Thought Process and Implementation

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 EvictionDoubly Linked ListHashMap
0 likes · 15 min read
Understanding LRU Cache: Interview Thought Process and Implementation