Adding caching function to phams tab - testing

This is still being tested.