- int p = strstrofs(s, "^", 0);
- if (p < 0)
- return s;
- return substring(s, p + 1, -1);
+#if CTX_CACHE
+ int i = strid(s);
+ string c = AL_gets(CTX_cache, i);
+ if (c) return c;
+#endif
+ int p = strstrofs(s, "^", 0);
+ string ret = (p < 0) ? s : substring(s, p + 1, -1);
+#if CTX_CACHE
+ LOG_DEBUGF("CTX(\"%s\")\n", s);
+ AL_sets(CTX_cache, i, ret);
+#endif
+ return ret;