fixed a bug... cache crashes if user navigates before fully loaded.
Also added no of hits variable to keep track of most used files.