Fixed cachehash to work correctly

Previously, the cachehash was not updating the *prev of each node,
so when you tried to remove a node from the middle it would seg fault.
This problem was not apparent because in the use function, there was an if statement
(if !node->prev) that would always return because the *prev were not getting set properly.
That if statement has been removed and the structure has been modified to allow cachehash to
work.