Smart cache initializer