cache the hash principle and joblib wrapper