In this blog post, we discuss the construction of a real-time ad cache server using Bun, ElysiaJS, and Dragonfly. These technologies offer exceptional performance capabilities and developer experience. The ad serving platform includes two main functionalities: Ad Metadata Management and Ad User Preference Management. We demonstrate how to use the Hash data type in Dragonfly for managing advertisement details and the Set data type for storing user preferences. Additionally, we provide instructions on starting Dragonfly, cloning the example repository, installing dependencies, running the application, and interacting with the ad server API. The codebase includes key places such as client initialization, key name management, Dragonfly compatibility, and end-to-end type safety.