Organizing Cache Keys In Complex Systems

  • This is a PHP article.
  • Laravel was used to write this article.
  • We'll be able to keep cache keys in the same codebase.
  • Due to this, we'll be able to quickly locate cache key-related code blocks in the same codebase or 3rd party's codebase.
  • We'll make an inventory class to keep all cache keys in one place.
  • The system will generate ghost methods from the inventory class automatically.
  • We'll write a cache-broking service that supports all clear methods through the inventory class.

Creating Cache Key Inventory

Using "CacheKeysInventory" to Create Ghost Clear Methods

Cache-Broking Service Endpoint

Creating Endpoint In API

/cache-broking endpoint

/cache-broking/{cacheKeyMethod} endpoint

Validating Clear Cache Requests That Came Over Endpoint




Software Developer,

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Set Up Kubernetes on AWS Using KOPS

Preparing for (a) Black Friday

Self Healing Serverless Applications — Part 1

Day 8 with GameDevHQ

How To Fix BLU Vivo XL5 Not Charging [Troubleshooting Guide]

How To Fix Micromax Canvas Fire 4G Q411 Not Charging [Troubleshooting Guide]

Why Is There an F in Front of This String?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
İlyas Özkurt

İlyas Özkurt

Software Developer,

More from Medium

Easily Share Your Twig Extensions with Symfony 6.1

PHP+Nginx with Docker in production

One way to work with money in PHP/Laravel

Best practice of using PHP Enums!

PHP Enum, best practice of using them