Adding node delete hook to update cache when spaces are deleted