Get how many items are in the cache.
By default, the {@code cacheName} is set to {@code default}.
CacheCount(cacheName=[string])
cacheName
string
false
The cache name to retrieve the data from, defaults to {@code default}
default
Get an item from the cache and return it as a Java {@link Optional}.
By default, the {@code cacheName} is set to {@code default}.
CacheGetAsAttempt(id=[string], cacheName=[string])
id
string
true
The cache id to retrieve
cacheName
string
false
The cache name to retrieve the id from, defaults to {@code default}
default
Checks if the cache region exists.
CacheRegionRemove(region=[string])
region
string
true
The cache region to check for existence.
Removes all stored objects in a cache region.
If no cache region is specified, objects in the default region are removed.
CacheRemoveAll(cacheName=[string])
cacheName
string
false
The name of the cache to get the keys from. Default is the default cache.
default
Get an item from the cache.
If the item is not found, the default value will be returned if provided, else null will be returned. By default, the {@code cacheName} is set to {@code default}.
CachePut(id=[any], value=[any], timespan=[any], idleTime=[any], cacheName=[string])
id
any
true
The cache id to store
value
any
true
The value to store in the cache
timespan
any
false
The duration for the cache to expire in seconds
idleTime
any
false
The duration for the cache to expire after last access in seconds
cacheName
string
false
The cache name to retrieve the id from, defaults to {@code default}
default
Checks if the cache region exists.
CacheRegionExists(region=[string])
region
string
true
The cache region to check for existence.
Lets you retrieve the underlying cache object to access additional cache functionality that is not implemented in the tag cfcache.
CacheGetSession(objectType=[string], isKey=[boolean])
objectType
string
false
default
isKey
boolean
false
false
Returns some properties of the cache engine
CacheGetEngineProperties()
This function does not accept any arguments
Get an item from the cache.
If the item is not found, the default value will be returned if provided, else null will be returned. By default, the {@code cacheName} is set to {@code default}.
CacheGet(id=[any], cacheName=[any], throwWhenNotExist=[any])
id
any
true
The cache id to retrieve, or an array of ids to retrieve
cacheName
any
false
The cache name to retrieve the id from, defaults to {@code default}
default
throwWhenNotExist
any
false
false
Returns the default cache name for the specified type.
CacheGetDefaultCacheName(type=[string])
type
string
true
The type of cache to get the default cache name for.
Returns some properties of the cache engine
CacheGetProperties(cacheName=[string])
cacheName
string
false
Returns some properties of the cache engine
CacheSetProperties()
This function does not accept any arguments
Get all the keys in the cache.
If no cache name is provided, the default cache is used. If a filter is provided, only keys that match the filter will be returned. A filter is a simple string that can contain wildcards and will leverage the {@link WildcardFilter} to match keys.
CacheGetAllIds(filter=[string], cacheName=[string], useRegex=[boolean])
filter
string
false
The filter to apply to the keys, this can be a simple Wildcard filter or a regex filter. The default is a simple wildcard filter.
cacheName
string
false
The name of the cache to get the keys from. Default is the default cache.
default
useRegex
boolean
false
If true, the filter will be treated as a full regular expression filter. Default is false.
false
Lookup the id in the cache to see if it exists or not.
The id can be a single id or an array of IDs By default, the {@code cacheName} is set to {@code default}. You can also pass in a filter
CacheIdExists(id=[any], cacheName=[string])
id
any
true
The cache id to retrieve, or an array of ids to retrieve
cacheName
string
false
The cache name to retrieve the id from, defaults to {@code default}
default
Lookup the id in the cache to see if it exists or not.
The id can be a single id or an array of IDs By default, the {@code cacheName} is set to {@code default}. You can also pass in a filter
cacheKeyExists(id=[any], cacheName=[string])
id
any
true
The cache id to retrieve, or an array of ids to retrieve
cacheName
string
false
The cache name to retrieve the id from, defaults to {@code default}
default
Deletes a single element from the cache.
CacheRemove(id=[any], throwOnError=[boolean], cacheName=[string])
id
any
true
A single ID or an array of IDs to remove from the cache.
throwOnError
boolean
false
If true, throw an exception if the key is not found. Default is false.
false
cacheName
string
false
The name of the cache to get the keys from. Default is the default cache.
default
Deletes a single element from the cache.
cacheDelete(id=[any], throwOnError=[boolean], cacheName=[string])
id
any
true
A single ID or an array of IDs to remove from the cache.
throwOnError
boolean
false
If true, throw an exception if the key is not found. Default is false.
false
cacheName
string
false
The name of the cache to get the keys from. Default is the default cache.
default
Get all the objects in the cache.
Careful, use this with caution as it can be a very expensive operation. Use a filter if possible please, since the default filter is EVERYTHING.
If no cache name is provided, the default cache is used. If a filter is provided, only keys that match the filter will be returned. A filter is a simple string that can contain wildcards and will leverage the {@link WildcardFilter} to match keys.
CacheGetAll(filter=[string], cacheName=[string], useRegex=[boolean])
filter
string
false
The filter to apply to the keys, this can be a simple Wildcard filter or a regex filter. The default is a simple wildcard filter.
*
cacheName
string
false
The name of the cache to get the keys from. Default is the default cache.
default
useRegex
boolean
false
If true, the filter will be treated as a full regular expression filter. Default is false.
false
Get the item metadata for a specific entry or entries.
By default, the {@code cacheName} is set to {@code default}.
The default metadata for a BoxCache is:
cacheName : The cachename the entry belongs to
hits : How many hits the entry has
timeout : The timeout in seconds
lastAccessTimeout : The last access timeout in seconds
created : When the entry was created
lastAccessed : When the entry was last accessed
key : The key used to cache it
metadata : Any extra metadata stored with the entry
isEternal : If the object has a timeout of 0
CacheGetMetadata(id=[any], cacheName=[string])
id
any
true
cacheName
string
false
The cache name to retrieve the id from, defaults to {@code default}
default
Get an item from the cache, it will throw an exception if the id is not found in the cache.
By default, the {@code cacheName} is set to {@code default}.
CacheGetOrFail(id=[string], cacheName=[string])
id
string
true
The cache id to retrieve
cacheName
string
false
The cache name to retrieve the id from, defaults to {@code default}
default
Clear an id or an array of id's from the specified cache.
If no cache name is provided, the default cache is used.
CacheClear(filterOrTags=[any], cacheName=[string])
filterOrTags
any
false
cacheName
string
false
The name of the cache to get the keys from. Default is the default cache.
default
Checks if the cache region exists.
CacheRegionNew(region=[string], properties=[struct], throwOnError=[boolean])
region
string
true
The cache region to check for existence.
properties
struct
true
throwOnError
boolean
false
false
Converts a JSON (JavaScript Object Notation) string data representation into data, such as a structure or array.
JSONDeserialize(json=[string], strictMapping=[boolean], useCustomSerializer=[string])
json
string
true
The JSON string to convert to data.
strictMapping
boolean
false
A Boolean value that specifies whether to convert the JSON strictly. If true, everything becomes structures.
true
useCustomSerializer
string
false
A string that specifies the name of a custom serializer to use. (Not used)
Creates an algorithmic hash of an object and returns it in the CFML compat upper case format
Hash(input=[any], algorithm=[string], encoding=[string], numIterations=[integer])
input
any
true
The item to be hashed
algorithm
string
false
The supported {@link java.security.MessageDigest} algorithm (case-insensitive) or "quick" for an insecure 64-bit hash
MD5
encoding
string
false
Applicable to strings ( default "utf-8" )
utf-8
numIterations
integer
false
1
Creates an algorithmic hash of an object and returns it in the CFML compat upper case format
Hash40(input=[any], algorithm=[string], encoding=[string], numIterations=[integer])
input
any
true
The item to be hashed
algorithm
string
false
The supported {@link java.security.MessageDigest} algorithm (case-insensitive) or "quick" for an insecure 64-bit hash
MD5
encoding
string
false
Applicable to strings ( default "utf-8" )
utf-8
numIterations
integer
false
1
Formats a code string, surrounded by <pre>
and </pre>
HTMLCodeFormat(string=[string], version=[string])
string
string
true
The number to format as a U.S. Dollar string.
version
string
false
Formats a number as a U.S.
Dollar string with two decimal places, thousands separator, and a dollar sign. If the number is negative, the return value is enclosed in parentheses. If the number is an empty string, the function returns "0.00".
DollarFormat(number=[any])
number
any
true
The number to format as a U.S. Dollar string.
No description available.
Throw(message=[any], type=[String], detail=[String], errorcode=[String], extendedinfo=[any], object=[Throwable])
message
any
false
type
String
false
detail
String
false
errorcode
String
false
extendedinfo
any
false
object
Throwable
false
No description available.
ObjectSave(object=[any], file=[string])
object
any
true
file
string
false
Lucee compat: Return information to of a Function as Struct
GetFunctionData(functionName=[string])
functionName
string
true
The BIF function you want information for (Ex: listLen)
Returns the metadata of a component path or instance in CFML style
GetComponentMetadata(path=[any])
path
any
true
The path to the component.
Retrieves value of a variable
GetVariable(name=[string])
name
string
true
The name of the variable to get.
Lucee compat: Return information to a Tag as Struct
GetTagData(nameSpaceWithSeperator=[string], tagName=[string])
nameSpaceWithSeperator
string
true
The namespace of the tag (Ex: cf)
tagName
string
true
The name of the tag (Ex: mail, http, dbinfo, etc)
Returns the metadata of a component path or instance in CFML style
GetClientVariablesList()
This function does not accept any arguments
Gets the context root.
If BoxLang is not running as a servlet-based web server, this always returns "/".
GetContextRoot()
This function does not accept any arguments
No description available.
ObjectLoad(input=[any])
input
any
true
Sets a variable in the name parameter to the value of the value parameter.
SetVariable(name=[string], value=[any])
name
string
true
The name of the variable to set.
value
any
true
The value to set the variable to.
Provides the Localized BIF and member functions for time units ( e.g.
different locales have different start days to the week )
LSWeek(date=[any], locale=[string], timezone=[string])
date
any
true
The DateTime object or datetime string representation
locale
string
false
The locale string to be parsed and applied to the final result
timezone
string
false
The timezone with which to cast the result
Provides the Localized BIF and member functions for time units ( e.g.
different locales have different start days to the week )
LSDayOfWeek(date=[any], locale=[string], timezone=[string])
date
any
true
The DateTime object or datetime string representation
locale
string
false
The locale string to be parsed and applied to the final result
timezone
string
false
The timezone with which to cast the result
Determines whether a string is avalid date/time string with either a specific locale or within the current system/application locale
LSIsDate(date=[any], locale=[string], timezone=[string])
date
any
true
The date/time string to check.
locale
string
false
The locale to use for parsing the date/time string.
timezone
string
false
Optional timezone to use for parsing the date/time string.
No description available.
DateCompare(date1=[any], date2=[any], datepart=[string])
date1
any
true
date2
any
true
datepart
string
false
Returns the legacy HTTP TimeString as specified for the now-obsolete RFC 1123/RCF 822.
This method should be used for legacy compatibility with older CFML engines and is not recommended for new code. The updated specification, RFC 2822 should be used for new implemenations.
GetHTTPTimestring(date=[any])
date
any
true
The date value to format
Formats a date in a locale-specific format
LSDateTimeFormat(date=[any], mask=[string], locale=[string], timezone=[string])
date
any
true
The date string or object
mask
string
false
Optional format mask, or common mask
locale
string
false
Optional locale designation of the output ( e.g. es-SA )
timezone
string
false
Optional specific timezone to apply to the date ( if not present in the date string )
Formats a date in a locale-specific format
LSDateFormat(date=[any], mask=[string], locale=[string], timezone=[string])
date
any
true
The date string or object
mask
string
false
Optional format mask, or common mask
locale
string
false
Optional locale designation of the output ( e.g. es-SA )
timezone
string
false
Optional specific timezone to apply to the date ( if not present in the date string )
Formats a date in a locale-specific format
LSTimeFormat(date=[any], mask=[string], locale=[string], timezone=[string])
date
any
true
The date string or object
mask
string
false
Optional format mask, or common mask
locale
string
false
Optional locale designation of the output ( e.g. es-SA )
timezone
string
false
Optional specific timezone to apply to the date ( if not present in the date string )
Returns the full day of the week name of a date object. Note that the behavior of this function is not localized, as Sunday is always considered to be the first day of the week.
DayOfWeekAsString(date=[any], timezone=[string], locale=[string])
date
any
false
The numeric integer to extract the day of week or month from.
timezone
string
false
locale
string
false
Returns the short day of the week name of a date object. Note that the behavior of this function is not localized, as Sunday is always considered to be the first day of the week.
DayOfWeekShortAsString(date=[any], timezone=[string], locale=[string])
date
any
false
The numeric integer to extract the day of week or month from.
timezone
string
false
locale
string
false
Returns the full month name of a date object
MonthAsString(date=[any], timezone=[string], locale=[string])
date
any
false
The numeric integer to extract the day of week or month from.
timezone
string
false
locale
string
false
Returns the short month name of a date object
MonthShortAsString(date=[any], timezone=[string], locale=[string])
date
any
false
The numeric integer to extract the day of week or month from.
timezone
string
false
locale
string
false
Takes a BoxLang DateTime object and converts it to the legacy java.util.Date object used by ACF and Lucee.
ToLegacyDate(date=[any])
date
any
true
The date/time string to convert.
Overload to creatDateTime behavior to account for ACF/Lucee specific manipulations ( e.g.
converting non-century years to current century )
createDate(year=[integer], month=[integer], day=[integer], hour=[integer], minute=[integer], second=[integer], millisecond=[integer], timezone=[string])
year
integer
false
The year of the date-time object.
0
month
integer
false
The month of the date-time object.
1
day
integer
false
The day of the date-time object.
1
hour
integer
false
The hour of the date-time object.
0
minute
integer
false
The minute of the date-time object.
0
second
integer
false
The second of the date-time object.
0
millisecond
integer
false
0
timezone
string
false
Parses a locale-specific datetime string or object
LSParseDateTime(date=[any], locale=[string], timezone=[string], format=[string])
date
any
true
the date, datetime string or an object
locale
string
false
timezone
string
false
the timezone to apply to the parsed datetime
format
string
false
the format mask to use in parsing
No description available.
DateTimeFormat(date=[any], mask=[string], timezone=[string], locale=[string])
date
any
true
mask
string
false
timezone
string
false
locale
string
false
No description available.
DateFormat(date=[any], mask=[string], timezone=[string], locale=[string])
date
any
true
mask
string
false
timezone
string
false
locale
string
false
No description available.
TimeFormat(date=[any], mask=[string], timezone=[string], locale=[string])
date
any
true
mask
string
false
timezone
string
false
locale
string
false