lucyparsons / OpenOversight

Police oversight and accountability through public data 👮
https://openoversight.com
GNU General Public License v3.0
240 stars 79 forks source link

Create generic `DB_CACHE` functions for `db.Model` classes #1011

Closed michplunkett closed 1 year ago

michplunkett commented 1 year ago

Fixes issue

https://github.com/lucyparsons/OpenOversight/issues/997

Description of Changes

I created a cacheing file that allows us to remove values from the cache when its underlying dataset has changed for all versions of a SQLAlchemy Model.

Tests and linting