[cache_names]

Description

Link: [cache_names]
Author: Jason Huck
Category: Utility
Version: 8.x
License:
Posted: Oct. 21, 2005
Updated: Jan. 16, 2006
More by this author...
Returns an array of all the current cache names.

Parameters

none


Sample Usage

// delete all caches that start with 'mysite_'
iterate(cache_names, local('i'));
	#i->beginswith('mysite_') ? cache_delete( -name=#i);
/iterate;
						

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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
define_tag(
	'names',
	-namespace='cache_',
	-priority='replace',
	-description='Returns all the currently stored cache names as an array.'
);
	local('out' = array);
	
	iterate(global('_Cache_Storage'), local('this'));
		#out->insert(#this->first->split('|')->get(1));
	/iterate;
	
	return(#out);
/define_tag;

 

Related Tags



Comments

none

Email:


Password:



Newest

Most Popular