we need to have only one query which will get all necessary data for the cache (from both tables)