Follow

CacheGet

The CacheGet tag can be used in Templates for Plain Text, HTML, and/or Mobile content.  You can also use Get Tags in Articles.  It is available for use on broadcaster systems only.

Using CacheGet

To get and cache content from an external html or text page, do the following:

  1. Open a Template or Article for editing.
  2. In the content, define the tag using the correct syntax.
  3. Save the Template or Article.
  4. Preview the Template to see if the content displays.
  5. Send a test campaign to verify the content displays.

CacheGet Syntax

CacheGet is only available on some systems, and can cause a campaign to deploy much more slowly depending on the number of unique calls that must be made to the defined page.

The syntax for the CacheGet tag is as follows:

%%cacheget "url=[URL]" command=[COMMAND]%%

url=[URL] is enclosed in quotation marks, no & between URL and commands.

If the command is improperly formated, the URL cannot be found, or some other error occurs, the command will fail.  When the Get fails, the campaign will not send messages to subscribers, and a failure notification will be delivered to the address of the user who initiated the campaign.

Commands

The [URL] is the URL to the content (html OR text) and [COMMAND] is one or more of the following options:

 

Command

Description

base_url

Uses the defined base URL in place of the default tracking URL.

Example: base_url=http:// sub.mydomain.com

fix_quotes

Fixes typesetter marks, such as "?" replacing special characters like curly quotes, from content defined by programs such as Word, with the correct or similar characters.  Defaults to 0, not enabled.

Example: fix_quotes=1 (enabled)

fix_relative

Fixes relative URLs in the content, adding protocol and host information to create absolute URLs.  Defaults to 0, not enabled.

Example: fix_relative=1 (enabled)

timeout

Stops attempting to pull the content if no response is received in the specified amount of time, defined in seconds. 

If a URL "times out" with "cacheget", the system will automatically refresh the cache by going out and obtaining a new copy of the content.  If it does not time out, then content is pulled from an in-memory cache. 

Defaults to 300 seconds, or five minutes.

Example: timeout=[SECONDS]

wrap

Wraps the content at the specified character length.  Wrapping occurs on word boundaries and not within quoted text or JavaScript.  It most useful for paginating plain-text.  Defaults to 0, not enabled.

Example: wrap=[NUMBER] (enabled, wrap at every [NUMBER] characters)

url

REQUIRED - Specifies the URL to access.  The URL must be a valid, publicly available page that may easily be opened and examined in your web browser.  It can be text or HTML content, depending on the format of your template.

Example: url=http:// mydomain.com/mytext.txt

Example: url=http:// mydomain.com/mycode.html

Examples

The following are examples using the commands above.  All commands can be combined in any order:

%%cacheget "url=http:// mydomain.com/myplaintext.txt?zip=##$zip##" base_url=http:// sub.mydomain.com fix_quotes=1 fix_relative=1 timeout=120 wrap=90%%

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk