Added new sidebar generator function that enables/disables caching sidebar