ExpDev07 / coronavirus-tracker-api

🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
https://coronavirus-tracker-api.herokuapp.com
GNU General Public License v3.0
1.59k stars 323 forks source link

Apply Creational Design Pattern #442

Closed david-yorku closed 3 years ago

david-yorku commented 3 years ago

What?

--> Applying Creational Design Pattern to caches.py file in app folder

Why?

--> Ensuring that only one database connection is made at a time to prevent multiple connections to the same database.

How?

--> Using the Singleton Design approach.