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