Search in sources :

Example 1 with LineChartData

use of com.dimple.project.home.domain.LineChartData in project DimpleBlog by martin-chips.

the class DashboardServiceImpl method getLineChartData.

@Override
@Cacheable(value = "DashBoard", key = "'LineChartData'+ #type")
@CacheExpire(expire = 3, type = TimeType.HOURS)
public LineChartData<Long> getLineChartData(String type) {
    LineChartData lineChartData;
    switch(type) {
        case LineChartData.BLOG_LINE:
            lineChartData = getBlogLineChartData();
            break;
        case LineChartData.VISITOR_LINE:
            lineChartData = getVisitorLineChartData();
            break;
        default:
            lineChartData = new LineChartData();
    }
    log.info("get line chart data \n{}", lineChartData);
    return lineChartData;
}
Also used : LineChartData(com.dimple.project.home.domain.LineChartData) CacheExpire(com.dimple.framework.config.redis.CacheExpire) Cacheable(org.springframework.cache.annotation.Cacheable)

Aggregations

CacheExpire (com.dimple.framework.config.redis.CacheExpire)1 LineChartData (com.dimple.project.home.domain.LineChartData)1 Cacheable (org.springframework.cache.annotation.Cacheable)1