Skip to content
Open access

LRU-Based Caching Optimization for REST API and GraphQL in a PBB-P2 Information System

Aug 2026 · Jurnal Locus Penelitian dan Pengabdian · 0 citations

Abstract

The increasing demand for fast and reliable access to taxpayer, tax object, billing, and payment information requires efficient data retrieval mechanisms in PBB-P2 information systems. Repeated database access for frequently requested data can increase server workload and prolong response times. Application-level caching can reduce redundant database operations; however, cache performance depends on the replacement policy applied when memory capacity is limited. This study aimed to evaluate the performance impact of Least Recently Used (LRU) caching compared with simple bounded caching and no-cache conditions in REST API- and GraphQL-based PBB-P2 information systems. A quantitative comparative experimental method was employed using a Node.js prototype connected to a MySQL/MariaDB database. The experiment evaluated three cache conditions (no cache, simple cache, and LRU cache) across four workload patterns: random, repeat, mixed, and pressure. Performance was assessed using response time, throughput, cache hit ratio, database query count, CPU utilization, and eviction accuracy. The results showed that LRU provided the most significant improvement under high cache eviction pressure conditions. In REST API testing, LRU reduced response time from 10.41 ms to 7.89 ms and decreased database queries by 74.66%. In GraphQL testing, LRU reduced response time from 19.58 ms to 17.03 ms and decreased database queries by 74.96%. However, LRU was not consistently superior, particularly when workloads had sufficient cache capacity or irregular access patterns. The study concludes that LRU caching is effective when temporal locality and cache pressure are present; however, its implementation should be guided by workload characteristics and system telemetry.

Read PDF