Skip to content
Snippets Groups Projects
Commit d8dbb9c5 authored by Mirco Nasuti's avatar Mirco Nasuti
Browse files

add caching to data-util

parent 55291168
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ package eu.hbp.mip.utils;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.jdbc.core.JdbcTemplate;
import java.util.List;
......@@ -24,7 +25,7 @@ public class DataUtil {
this.scienceMainTable = scienceMainTable;
}
// @Cacheable("varsdata")
@Cacheable("varsdata")
public JsonObject getDataFromVariables(List<String> vars)
{
JsonObject data = new JsonObject();
......@@ -51,7 +52,7 @@ public class DataUtil {
return data;
}
// @Cacheable("colscount")
@Cacheable("colscount")
public long countVariables()
{
long count = jdbcTemplate.queryForObject(
......@@ -60,7 +61,7 @@ public class DataUtil {
return count;
}
// @Cacheable("rowscount")
@Cacheable("rowscount")
public long countAdniRows()
{
long count = jdbcTemplate.queryForObject(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment