added caching to the foreign key widget