added protected variables

added protected variables to hold database and cache instances