add two-way cache