Lasso Soft Inc. > Home


AuthorJason Huck
LicensePublic Domain
Posted08 Apr 2008
Updated13 May 2009
More by this author...


This tag returns a map of information about the specified cache, including its id, type, content, and last refresh date. Returns null if the specified cache is not found. The map elements are: content, stat_fetch, type, id, stat_store, and date. Useful if you need to know when a cache was created, vs. when it will expire.

Sample Usage


-> 2008-04-08 14:12:44

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

	-req='name', -copy,
	-description='Returns information about the specified cache.'
	// cache storage mechanism changed as of 8.5.6
		// map elements: content, stat_fetch, type, id, stat_store, date
		// add the server name to the cache name if host-specific caches is enabled
		cache_preferences->find('_cache_host') == 'Y' ? #name += '|' + server_name;

		// return null if there are no caches or the specified cache does not exist		
		!global_defined('_Cache_Storage') || $_Cache_Storage->find(#name) == '' ? return;
		// return a reference to the specified cache
		!local_defined('useglobal') ? local('useglobal') = true;

			thread_atomic(globals->find(#c_prefix + 'fetch'));
				globals->insert((#c_prefix + 'fetch') = integer(globals->find(#c_prefix + 'fetch')) + 1);
				local('fetch') = globals->find(#c_prefix + 'fetch');
				local('content') = globals->find(#c_prefix + 'content');
				local('date') = globals->find(#c_prefix + 'date');
				local('store') = @globals->find(#c_prefix + 'store');
			vars->insert((#c_prefix + 'fetch') = integer(vars->find(#c_prefix + 'fetch')) + 1);
			local('fetch') = vars->find(#c_prefix + 'fetch');
			local('content') = vars->find(#c_prefix + 'content');
			local('date') = vars->find(#c_prefix + 'date');
			local('store') = @vars->find(#c_prefix + 'store');
		local('out') = map(
			'content' = #content,
			'stat_fetch' = #fetch,
			'type' = #c_type,
			'id' = null,
			'stat_store' = #store,
			'date' = #date

Related Tags


13 May 2009, Jason Huck

Updated for 8.5.6.

Contains a quick'n'dirty fix for the changes in Lasso's caching system introduced in 8.5.6.

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft