Fixing localconfig caching issues in configmanager class

adding cachekey generation function, hopefully I referenced all the spots in the configmanager class where it's needed.

adding an invalidate cache function, although it turned out to not be needed for localconfig at this time when I was testing without using this function. It made sense at the time, now I can't remember why this still works.