package com.awspaas.user.apps.donenow_ivt;

import com.actionsoft.apps.listener.PluginListener;
import com.actionsoft.apps.resource.AppContext;
import com.actionsoft.apps.resource.plugin.profile.AWSPluginProfile;
import com.actionsoft.apps.resource.plugin.profile.CachePluginProfile;
import com.awspaas.user.apps.donenow_ivt.cache.formStatusCache;

import java.util.ArrayList;
import java.util.List;

public class Plugins implements PluginListener {
    /**
     *注册插件
     * @param appContext
     * @return
     */
    @Override
    public List<AWSPluginProfile> register(AppContext appContext) {
        List<AWSPluginProfile> list = new ArrayList<>();

        CachePluginProfile cacheProfile = new CachePluginProfile(formStatusCache.class);
        cacheProfile.timeToLiveSeconds(3600);// 缓存时间 1小时
        list.add(cacheProfile);

        return list;
    }
}