added sql cache, updated models