Added sql hash cache writing handler logic. refs #451