I want to cache only two tables but have to use the same DBContext for all the tables/queries.

Hi,
Your example shows that I have to create DBContext for each table I want to cache. but I want to cache only two tables and can't create different types of DBContext for each table.(Because of my design implementation and I am not in a position to change it).
Is it possible?

I don't understand "I have to create DBContext for each table" - you have just one DbContext for the entire model. If you want to cache results for selected tables only you need to override the
CachingPolicy class and return true from the CanbeCached method for entity sets corresponding to tables whose results you want to cache. Otherwise return 'false'.