cache records and activity
move records query into cache block