rais-server: extract cache setup to function
rais-server: extract cache setup to function

uoregon-libraries/rais-image-server,uoregon-libraries/rais-image-server,uoregon-libraries/rais-image-server,uoregon-libraries/rais-image-server