Added the history cache dir.

Added the history cache dir.
Added a perl which module function.

Added a perl which module function.