Cache mechanism for boxes

#1357