add photo db cache