Cache and page display, this is the last part of the, I really did not think a serial actually spent a few hours. Tired...
External links and tracking
If you want to link and track external Web site resources, you can use the following helper method:
Ruby Code
External_link_to (Text,url)
external_link_to (Image_tag (image), URL)
These two ways to generate links (one is a text link, one is a graphical link) can be logged on the link. If the $use_external_link_popups parameter in the Environment.rb file is set to true, the outer link will be in the form of a pop-up box. The following parameters can be passed to the URL
Ruby Code
: New_window=>true or false-determines if link appears in new browser window (defaults to True)
: Show_only_if_lin K=>true or false-determines if image or text is shown if no URL was supplied (defaults to false)
: Show_link_icon =>true or false-determines if the external icon image is shown after the link (defaults to true for text links and F Alse for image links)
For graphics, you can pass the following parameters:
Ruby Code
:alt=> ' value '---Alt tag is set with the value passed
:title=> ' value '--title tag being set with the value passed
For the moment, there are no reports to track the external links. All link tracking is stored through the "external_link_logs" database.
Partial caching mechanism
Partial caching requires configuration file settings to enable (CONFIG/PRODUCTION.RB) and to open the storage mechanism
As follows:
Ruby Code
Config.cache_store =: Mem_cache_store, ' 10.0.0.1:11211 ', ' 10.0.0.2:11211 '
The cache settings are as follows:
Ruby Code
Config.action_controller.perform_caching = True