| 810 | } |
| 811 | |
| 812 | void |
| 813 | TSPluginInit(int /* argc */, const char * /* argv */[]) |
| 814 | { |
| 815 | TSPluginRegistrationInfo info; |
| 816 | |
| 817 | info.plugin_name = (char *)PLUGIN; |
| 818 | info.vendor_name = (char *)"Apache Software Foundation"; |
| 819 | info.support_email = (char *)"dev@trafficserver.apache.org"; |
| 820 | |
| 821 | if (TSPluginRegister(&info) != TS_SUCCESS) { |
| 822 | VERROR("plugin registration failed\n"); |
| 823 | } |
| 824 | |
| 825 | GeneratorInitialize(); |
| 826 | |
| 827 | // We want to check early on if the request is cacheable or not, and if it's not cacheable, |
| 828 | // we benefit signifciantly from turning off the cache completely. |
| 829 | TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TxnHook); |
| 830 | |
| 831 | // Wait until after the cache lookup to decide whether to |
| 832 | // intercept a request. For cache hits we will never intercept. |
| 833 | TSHttpHookAdd(TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK, TxnHook); |
| 834 | } |
| 835 | |
| 836 | TSReturnCode |
| 837 | TSRemapInit(TSRemapInterface * /* api_info */, char * /* errbuf */, int /* errbuf_size */) |
nothing calls this directly
no test coverage detected