mirror of
https://gitee.com/dcren/initializr.git
synced 2025-11-28 09:22:41 +08:00
Rework caching configuration
Closes gh-401
This commit is contained in:
@@ -39,7 +39,7 @@ public class ProjectResourceLocator {
|
||||
* @param location a resource location
|
||||
* @return the content of the resource
|
||||
*/
|
||||
@Cacheable("project-resources")
|
||||
@Cacheable("initializr.project-resources")
|
||||
public byte[] getBinaryResource(String location) {
|
||||
try (InputStream stream = getInputStream(location)) {
|
||||
return StreamUtils.copyToByteArray(stream);
|
||||
@@ -54,7 +54,7 @@ public class ProjectResourceLocator {
|
||||
* @param location a resource location
|
||||
* @return the content of the resource
|
||||
*/
|
||||
@Cacheable("project-resources")
|
||||
@Cacheable("initializr.project-resources")
|
||||
public String getTextResource(String location) {
|
||||
try (InputStream stream = getInputStream(location)) {
|
||||
return StreamUtils.copyToString(stream, UTF_8);
|
||||
|
||||
Reference in New Issue
Block a user