Refactoring of maxmind code and proper logging for it implemented
log_cacheprefix now accepts a an explicit length parameter
Variable declaration moved to the top of the function
Implementation for cache prefix changed.