implemented database and cache security