   Template Toolkit       ,     ;)

      ,  :    .
          .
     ,    ,              ...

  ...

     "", . . ,      .
 , ,     index.tt,    (  INCLUDE  PROCESS)  header.tt  footer.tt (      ).
 header.tt  footer.tt   -  . .
 , <a href="http://www.reg.ru/"></a> ,           ,  90%       TT.         (   Catalyst)   -,    .     ...
 ,   ,   ( ,     )  ,    .

,      :         --
,     ,        ,    .
     --   .

 ...
         .
        <a href="http://www.stonehenge.com/merlyn/LinuxMag/col75.html">Profiling in Template Toolkit via overriding</a>,        .
  <a href="https://svn.reg.ru/oss/Template-Context-Profileable/"></a>.
, ,    <a href="https://svn.reg.ru/oss/Template-Context-SRS/">Template::Context::SRS</a>.
      YAPC 2010     ""    CPAN,       . ;)
   CPAN , ,  :           "SRS::Cache",     ,    .   -     ;)
  ,   .  .     production: "  "    .

* * *

  .
  :

1. -     "use Template::Context::SRS;".

2.   ,      - ,  - :

[% PROCESS index_reg_bar.inc
    lang = lang
    pricegroup = pricegroup
    __cache_time = -1
%]

      "__cache_time".    .
"-1"  --  .         .

         --       ,
       .
      ,      - :    ..
 ,    /         .
,          --  (lang)     (pricegroup).

  ,           ,     :

[%- PROCESS
    header_screen_body_cached.inc
	new_messages_num			= user_messages.size() || user_messages_num || 0
	__nocache_banner_no			= banner_no
	__nocache_lang				= lang
	__nocache_wide_flag			= wide_flag
	__nocache_path_query			= path_query
	__nocache_user_id			= user_id
	__nocache_user_balance			= user_balance
	__nocache_servername			= servername
	__nocache_redirect_after_login		= redirect_after_login
	__nocache_path				= path
	__nocache_show_tooltips			= show_tooltips
	__nocache_show_tipsofday		= show_tipsofday
	__nocache_nostdheader			= nostdheader
	__nocache_tab_item			= tab_item
	__nocache_subtab_item			= subtab_item
	__nocache_load_token_js			= load_token_js
	__nocache_title_nopad			= title_nopad
	__nocache_page_title_body		= page_title_body
	__nocache_page_title			= page_title
	__nocache_req_method			= c.req.method
	__cache_time				= user_messages.size() ? 0 : -1
-%]

,   "__nocache_" -- ,      .
     --    .
    ,   "__nocache_",      --    .
, "page_title" -- ,            .
  ,   "page_title = page_title", ,  ,   - .
 "__nocache_"      -- ,              .

* * *

,   .   --    , , <a href="http://www.reg.ru/"> </a>,   .
    ,    ;)
