1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package tools.gsf.facade;
18
19 import COM.FutureTense.Cache.CacheManager;
20 import COM.FutureTense.Interfaces.ICS;
21 import COM.FutureTense.Util.ftMessage;
22 import tools.gsf.facade.runtag.render.LogDep;
23
24 import static COM.FutureTense.Interfaces.Utilities.goodString;
25
26 public final class RenderUtils {
27
28 private RenderUtils() {
29 }
30
31
32
33
34
35
36
37
38
39 public static boolean isCacheable(final ICS ics, final String pname) {
40 return CacheManager.clientIsSS(ics) ? ics.getPageData(pname).getSSCacheInfo().shouldCache() : ics.getPageData(
41 pname).getCSCacheInfo().shouldCache();
42 }
43
44
45
46
47
48
49
50 public static void recordBaseCompositionalDependencies(final ICS ics) {
51
52 if (isCacheable(ics, ics.GetVar(ftMessage.PageName))) {
53 if (goodString(ics.GetVar("seid"))) {
54 LogDep.logDep(ics, "SiteEntry", ics.GetVar("seid"));
55 }
56 if (goodString(ics.GetVar("eid"))) {
57 LogDep.logDep(ics, "CSElement", ics.GetVar("eid"));
58 }
59 if (goodString(ics.GetVar("tid"))) {
60 LogDep.logDep(ics, "Template", ics.GetVar("tid"));
61 }
62
63 }
64 }
65
66 }