Create a folder in C:\ColdFusion2021\cfusion\wwwroot\CFIDE\cache. Make sure that the name of the folder is same as the name of the custom plugin.
- ColdFusion User Guide
- Introduction to ColdFusion
- About Adobe ColdFusion
- Download Adobe ColdFusion
- What's new in ColdFusion (2023 release)
- ColdFusion (2023 release) Release Notes
- Deprecated Features
- REST enhancements in ColdFusion
- Central Configuration Server
- Server Auto-Lockdown
- Asynchronous programming
- Docker images for ColdFusion
- SAML in ColdFusion
- JSON Web Tokens in ColdFusion
- Use SAML and LDAP in Admin
- Cloud Services in ColdFusion
- ColdFusion and GCP Storage
- ColdFusion and GCP Firestore
- ColdFusion and GCP PubSub
- ColdFusion and Amazon S3
- ColdFusion and DynamoDB
- ColdFusion and Amazon SQS
- ColdFusion and Amazon SNS
- ColdFusion and MongoDB
- ColdFusion and Azure Blob
- ColdFusion and Azure Service Bus
- Multi-cloud storage services
- Multi-cloud RDS databases
- ColdFusion and Azure Cosmos DB
- Install ColdFusion
- Install the server configuration
- Install ColdFusion- Zip Installer
- Install ColdFusion- GUI Installer
- CFSetup configuration tool
- ColdFusion Licensing and Activation
- ColdFusion server profiles
- Prepare to install ColdFusion
- Install the JEE configuration
- Install ColdFusion Express
- Install integrated technologies
- Configure your system
- Troubleshoot installation issues
- Install ColdFusion silently
- Install Adobe ColdFusion (2016 release) hotfix
- ColdFusion (2018 release) - Install JEE configuration
- Use ColdFusion
- Performance Monitoring Toolset
- Overview of ColdFusion Performance Monitoring Toolset
- Auto-discovery of ColdFusion nodes and clusters
- Code profiler in ColdFusion Performance Monitoring Toolset
- Configure ColdFusion Performance Monitoring Toolset settings
- Install ColdFusion Performance Monitoring Toolset
- View cloud metrics
- Monitor GraphQL in Performance Monitoring Toolset
- Configure TLS/SSL and Authentication for Elasticsearch 8.x in Performance Monitoring Toolset
- View cluster and node metrics
- View data source metrics
- View external services
- View incoming services
- View list of sites and busy connections
- View topology of sites
- Datastore Health Monitoring
- Performance Monitoring Toolset Update 1
- Secure Performance Monitoring Toolset with HTTPS/SSL
- Performance Monitoring Toolset deployment guide
- Adobe ColdFusion Builder extension for Visual Studio Code
- Getting started with Adobe ColdFusion Builder extension for Visual Studio Code
- Add a ColdFusion server
- Project Manager
- Work with ColdFusion code
- Profile preferences
- Debug applications
- Refactoring
- Services Browser
- RDS support
- PMT Code Profiler integration
- Security Analyzer report integration
- Known issues in this release
- Getting started with Adobe ColdFusion Builder extension for Visual Studio Code
- Use ColdFusion Builder
- About ColdFusion Builder
- System requirements | ColdFusion Builder
- Install ColdFusion Builder
- Edit code in ColdFusion Builder
- Manage servers in ColdFusion Builder
- Manage projects in ColdFusion Builder
- What's new in Adobe ColdFusion Builder (2018 release)
- Frequently Asked Questions (FAQ) | Adobe ColdFusion Builder (2018 release)
- Debug applications in ColdFusion Builder
- ColdFusion Builder workbench
- ColdFusion Builder extensions
- Debugging Perspective in ColdFusion Builder
- Build mobile applications using ColdFusion Builder
- Bundled ColdFusion Server
- Debug mobile applications in ColdFusion Builder
- Use extensions in ColdFusion Builder
- Coldfusion API Manager
- Overview of Adobe ColdFusion API Manager
- Features in ColdFusion API Manager
- Get started with ColdFusion API Manager
- Install ColdFusion API Manager
- Authentication types
- Create and publish APIs
- Administrator
- Subscriber
- Throttling and rate limiting
- Notifications
- Connectors
- Set up cluster support
- Integrate ColdFusion and API Manager
- Metrics and Logging in API Manager
- Generate Swagger documents
- Configure SSL
- Known issues in this release
- Policies in ColdFusion API Manager
- Create a Redis cluster
- Multitenancy in API Manager
- Docker images for ColdFusion API Manager
- Configure and administer ColdFusion
- Administer ColdFusion
- Use the ColdFusion administrator
- Data Source Management for ColdFusion
- Connect to web servers
- Deploy ColdFusion applications
- Administer ColdFusion security
- Basic Troubleshooting and FAQs
- Work with Server Manager
- Use multiple server instances
- WebSocket Enhancements (ColdFusion 11)
- Security Enhancements (ColdFusion 11)
- Work with Server Monitor
- ColdFusion Administrator API Reference
- CFML Reference
- Introduction to CFML Reference
- Reserved words and variables
- ColdFusion tags
- ColdFusion functions
- Ajax JavaScript functions
- Ajax JavaScript functions
- Function summary Ajax
- ColdFusion.Ajax.submitForm
- ColdFusion.Autosuggest.getAutosuggestObject
- ColdFusion.Layout.enableSourceBind
- ColdFusion.MessageBox.getMessageBoxObject
- ColdFusion.ProgressBar.getProgressBarObject
- ColdFusion.MessageBox.isMessageBoxDefined
- JavaScriptFunctionsinColdFusion9Update1
- ColdFusion ActionScript functions
- ColdFusion mobile functions
- Application.cfc reference
- Script functions implemented as CFCs
- ColdFusion Flash Form style reference
- Styles valid for all controls
- Styles for cfform
- Styles for cfformgroup with horizontal or vertical type attributes
- Styles for box-style cfformgroup elements
- Styles for cfformgroup with accordion type attribute
- Styles for cfformgroup with tabnavigator type attribute
- Styles for cfformitem with hrule or vrule type attributes
- Styles for cfinput with radio, checkbox, button, image, or submit type attributes
- Styles for cftextarea tag and cfinput with text, password, or hidden type attributes
- Styles for cfselect with size attribute value of 1
- Styles for cfselect with size attribute value greater than 1
- Styles for cfcalendar tag and cfinput with dateField type attribute
- Styles for the cfgrid tag
- Styles for the cftree tag
- ColdFusion Flash Form Style Reference
- ColdFusion event gateway reference
- ColdFusion Event Gateway reference
- addEvent
- CFEvent
- CFEventclass
- Constructor
- Gateway development interfaces and classes
- getStatus
- setCFCPath
- setCFCMethod
- getOriginatorID
- getLogger
- getBuddyList
- getBuddyInfo
- IM gateway message sending commands
- IM Gateway GatewayHelper class methods
- onIncomingMessage
- onIMServerMessage
- onBuddyStatus
- onAddBuddyResponse
- onAddBuddyRequest
- IM Gateway CFC incoming message methods
- IM gateway methods and commands
- CFML CFEvent structure
- warn
- info
- setOriginatorID
- data command
- submit Multi command
- submit command
- setGatewayType
- setGatewayID
- setData
- setCFCListeners
- outgoingMessage
- getStatusTimeStamp
- numberOfMessagesReceived
- numberOfMessagesSent
- removeBuddy
- removeDeny
- removePermit
- setNickName
- setPermitMode
- setStatus
- SMS Gateway CFEvent structure and commands
- SMS Gateway incoming message CFEvent structure
- getStatusAsString
- getProtocolName
- getPermitMode
- getPermitList
- getNickName
- getName
- getDenyList
- getCustomAwayMessage
- getQueueSize
- getMaxQueueSize
- getHelper
- getGatewayType
- getGatewayServices
- getGatewayID_1
- getGatewayID
- getData
- getCFCTimeout
- setCFCTimeout
- getCFCPath
- getCFCMethod
- GatewayServices class
- Gateway interface
- GatewayHelper interface
- addPermit
- addDeny
- addBuddy
- error
- debug
- Logger class
- stop
- start
- CFML event gateway SendGatewayMessage data parameter
- restart
- fatal
- SMS gateway message sending commands
- ColdFusion C++ CFX Reference
- ColdFusion Java CFX reference
- WDDX JavaScript Objects
- Develop ColdFusion applications
- Introducing ColdFusion
- Changes in ColdFusion
- Changes in ColdFusion
- Replacement of JRun with Tomcat
- Security enhancements
- ColdFusion WebSocket
- Enhanced Java integration
- ColdFusion ORM search for indexing and search
- Solr enhancements
- Scheduler enhancements
- Integration with Microsoft Exchange Server 2010
- RESTful Web Services in ColdFusion
- Lazy loading across client and server in ColdFusion
- Web service enhancements
- Displaying geolocation
- Client-side charting
- Caching enhancements
- Server update using ColdFusion Administrator
- Secure Profile for ColdFusion Administrator
- Introduction to application development
- The CFML programming language
- Building blocks of ColdFusion applications
- Develop CFML applications
- Develop CFML applications
- Design and optimize a ColdFusion application
- Handle errors
- Use persistent data and locking
- Use ColdFusion threads
- Secure applications
- Client-side CFML (for mobile development)
- Use the ColdFusion debugger
- Debugging and Troubleshooting Applications
- Develop globalized applications
- REST enhancements in ColdFusion
- Authentication through OAuth
- Social enhancements
- Develop mobile applications
- Access and use data
- ColdFusion ORM
- ColdFusion and HTML5
- Flex and AIR integration in ColdFusion
- Request and present information
- Office file interoperability
- ColdFusion portlets
- Work with documents, charts, and reports
- Use web elements and external objects
- Use external resources
- Send and receive e-mail
- Interact with Microsoft Exchange servers
- Interact with remote servers
- Manage files on the server
- Use event gateways
- Create custom event gateways
- Use the ColdFusion extensions for Eclipse
- Use the data services messaging event gateway
- Use the data management event gateway
- Use the FMS event gateway
- Use the instant messaging event gateways
- Use the SMS event gateway
In ColdFusion, in addition to the default caching engine, Ehcache, the following caching engines are supported:
Changes in the Administrator settings
In the ColdFusion administrator, you can choose the caching engine by clicking Server Settings > Caching.

For each option, you must make some configuration changes.
JCS
Java Caching System (JCS) is an open source caching engine released through the Apache Jakarta sub-project. JCS provides in-memory caching and algorithms for selectively removing objects from the cache. It also offers more advanced features, such as, indexed disk caching and support for distributed caches.
To use JCS, choose the option in the ColdFusion administrator, as shown above.
You can also configure JCS at the application level. Use the new application variables to set the cache engine and the caching properties file.
Application.cfc
component{ this.name = "appSpecificCacheTest"; this.cache.configfile = "jcsconfig.properties"; this.cache.engine = 'jcs'; this.applicationTimeout = createtimespan(0,0,0,5); }
For more information on the variables you can define in Application. cfc , see Application.cfc variables.
jcsconfig.properties
maxElementsInMemory=5 eternal=false timeToIdleSeconds=30 timeToLiveSeconds=5
You can also modify the settings via the Administrator (Server Settings > Caching), as shown below:

To verify the configuration, create a cfm, as shown below:
<cfscript> writedump(cacheGetEngineProperties()); // Returns the cache engine properties writeoutput(cacheGetEngineProperties().name); // Returns the name of the cache engine </cfscript>
Auxiliary cache support in JCS
You can use JCS to persist cache into a database, which can be accessed via multiple nodes. From the ColdFusion administrator, add a data source for clustering JCS.
From the ColdFusion Administrator, click Server Settings > Caching. Choose the data source from the drop-down.

When you save the changes, a table, JCS_STORE gets created in the selected datasource.
This example uses My SQL as auxiliary cache.
To support auxiliary cache in JCS, edit the file cache.ccf located in <coldfusion_install_dir>/cfusion/lib. Add the following lines:
# MYSQL disk cache used for flight options jcs.auxiliary.MYSQL=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheFactory jcs.auxiliary.MYSQL.attributes=org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheAttributes jcs.auxiliary.MYSQL.attributes.userName=<user name> jcs.auxiliary.MYSQL.attributes.password=<password> # Make sure the datasource is the one in which JCS_STORE is created # via the Administrator jcs.auxiliary.MYSQL.attributes.url=jdbc:mysql://localhost:3306/<datasource> jcs.auxiliary.MYSQL.attributes.driverClassName=com.mysql.jdbc.Driver jcs.auxiliary.MYSQL.attributes.tableName=JCS_STORE jcs.auxiliary.MYSQL.attributes.UseDiskShrinker=false
Also set jcs.default = MYYSQL in cache.ccf.
Restart ColdFusion.
The JDBC disk cache uses a relational database, such as MySQL, as a persistent data store. The cache elements are serialized and written into a BLOB.
Memcached
Memcached is a distributed caching solution for Java enterprise applications. A Memcached server can be shared across multiple ColdFusion instances, or multiple Memcached servers can be configured with a single ColdFusion instance.
To use Memcached, download Memcached, and run the server from the command line using the command:
memcached
The Memcached server, picks up the default port 11211.
In the ColdFusion administrator, specify the Memcached server details in Server Settings > Caching.

You can also configure Memcached at the application level. There are two new application variables that you need to use to declare the caching engine.
- this.cache.engine: Specify the caching engine to be used. Choose from jcs or memcached or ehcache .
- this.cache.configFile: Specify the configuration file for memcached . For example, the file can contain key-value pairs of caching properties, as shown below:
maxElementsInMemory=5 eternal=false timeToIdleSeconds=30 timeToLiveSeconds=5
You can also modify the settings via the Administrator (Server Settings > Caching), as shown below. The interface is similar for other cache engines:

// Application.cfc component{ this.name='appUsingMemcached'; this.cache.engine='memcached'; this.cache.configFile='memcachedconfig.properties'; this.cache.applicationTimeout=createtimespan(0,0,0,5); }
// memcachedconfig.properties maxElementsInMemory=5 eternal=false timeToIdleSeconds=30 timeToLiveSeconds=10
Redis
Redis is an open source (BSD licensed), in-memory data structure store, used as a database and cache. It supports data structures such as strings, hashes, lists, sets, and so on.
To use Redis, download Redis, and run the server from the command line using the command:
redis-server
The Redis server picks up the default port 6379.
Redis is distributed. In a clustered environment, all nodes can communicate with the same Redis node.
In the ColdFusion administrator, specify the Redis server details in Server Settings > Caching.

You can also configure Redis at the application level. There are two new application variables that you need to use to declare the caching engine.
- this.cache.engine: Specify the caching engine to be used. Choose from jcs, redis, memcached or ehcache.
- this.cache.configFile: Specify the configuration file for redis. For example, the file can contain key-value pairs of caching properties, as shown below:
maxElementsInMemory=5 eternal=false timeToIdleSeconds=30 timeToLiveSeconds=5
<!--- Application.cfc ---> <cfcomponent> <cfscript> this.name = "appSpecificCacheTest"; this.cache.configfile = "redisconfig.properties"; this.cache.engine = "redis"; this.applicationTimeout = createtimespan(0,0,0,5); </cfscript> </cfcomponent>
// redisconfig.properties maxElementsInMemory=5 eternal=false timeToIdleSeconds=30 timeToLiveSeconds=5
Custom cache plugin
Apart from using Memcached, Redis, or JCS, you can implement your custom cache plugin. We have provided an interface (C:\ColdFusion2021\cfusion\wwwroot\CFIDE\cache\ICustomCache.cfc), through which you can implement a custom caching engine.
Place your implementations in the same folder as ICustomCache.cfc.
ColdFusion takes advantage of Infinispan libraries. Download the files from the stable release,
- infinispan -embedded-query-9.1.3.Final.jar
- infinispan -embedded-9.1.3.Final.jar
Copy the files in C:\ColdFusion2021\cfusion\lib and restart ColdFusion.
To add a custom plugin:
-
-
Create <any CFC name>.cfc that implements ICustomCache.cfc and write the implementations. For example,
<cfcomponent implements="ICustomCache"> <cffunction name="put" > <cfargument name="obj" type="struct"> <cfoutput>"inside put"</cfoutput> <cfset defaultCache=Application.defaultCacheManager.getcache()> <cfset defaultCache.put(obj.id,#obj.value#)> </cffunction> </cfcomponent>
-
Create config.xml that contains references to Infinispan libraries.
<infinispan> <cache-container default-cache="local"> <local-cache name="local"/> </cache-container> </infinispan>
-
Create Application.cfc.
<cfcomponent> <cfset this.name= "xyz"> <cfscript> function onApplicationStart() { writelog("In onApplicationStart()"); Application.defaultCacheManager=CreateObject("java","org.infinispan.manager.DefaultCacheManager").init('C:\ColdFusion2021\cfusion\wwwroot\custom_cache\config.xml'); writelog("In onApplicationStart()"); } function onApplicationEnd() { writelog("In onApplicationEnd()"); } </cfscript> </cfcomponent>
Create an app with the following:
// Application.cfc <cfcomponent> <cfscript> this.name = "mycache_app"; this.cache.engine = "mycache"; </cfscript> </cfcomponent>
Admin APIs
The following are the Admin APIs related to caching that are a part of the 2018 release of ColdFusion. The APIs are a part of runtime.cfc.
verifyRedisCacheStorageConnection
Description: Verifies connection to the Redis cache storage.
Syntax
void verifyRedisCacheStorageConnection (sessionStorageHost, numeric sessionStoragePort, sessionStoragePassword)
Parameter |
Req/Opt |
Default |
Description |
---|---|---|---|
sessionStorageHost |
Optional |
Any |
The hostname for Redis cache storage. |
sessionStoragePort |
Optional |
Numeric |
The port number for Redis cache storage. |
sessionStoragePassword |
Optional |
Any |
The password for the Redis cache storage. |
setServerCachingEngine
Description: Changes the caching engine at the server level.
Syntax
void setServerCachingEngine (required engine)
Parameter |
Req/Opt |
Default |
Description |
---|---|---|---|
engine |
Required |
Any |
1. Ehcache 2. JCS 3. Memcached 4. Redis |
setJCSClusterDsnName
Description: Set the data source for JCS cluster.
Syntax
void setJCSClusterDsnName (required dsn, required boolean createTables)
Parameter |
Req/Opt |
Default |
Description |
---|---|---|---|
dsn |
Required |
Any |
Name of the data source. |
createTables |
Required |
Any |
Whether to create a table. |
setCachingRedisServer
Description: Set the caching engine for Redis.
Syntax
void setCachingRedisServer (required host, required port, required password, required boolean cluster)
Parameter |
Req/Opt |
Default |
Description |
---|---|---|---|
host |
Required |
any |
Host address of the server. |
port |
Required |
any |
Port number of the server. |
password |
Required |
any |
Password of the server. |
cluster |
Required |
Boolean |
Whether a cluster is enabled in Redis. |
getMemcachedServer
Description: Gets the details of the Memcached caching engine.
Syntax
any getMemcachedServer ()
For more information on caching in ColdFusion, see Optimizing ColdFusion applications.
Azure Redis Cache
Azure Cache for Redis provides an in-memory data store based on Redis. The caching performance is enhanced by copying frequently accessed data to a high performant storage. With Azure Cache for Redis, this storage is located in-memory instead of being loaded from disk by a database.
Azure Cache for Redis can be used as the following:
- Distributed data cache
- Session store
- Message broker
Azure Cache for Redis is hosted on Azure, and accessible to any application within or outside of Azure. For more information, see Azure Cache for Redis.
In the Azure portal, create a Redis cache.
In the cache details page, enter the following:
- Primary key
- Secondary key
- Primary connection string
- Secondary connection string
Use these connection details in the Caching page of the ColdFusion Administrator.
After you click Verify Connection, the caching engine now gets stored in Azure cloud.
AWS ElastiCache
Amazon ElastiCache is a Caching-as-a-Service from Amazon Web Services. AWS manages and scales a distributed in-memory cache environment in the cloud. AWS removes the complexity associated with deploying and managing a distributed cache environment.
For more information, see AWS ElastiCache.
AWS ElastiCache provides the following:
- Automatic detection and recovery from cache node failures.
- Automatic failover of a failed primary cluster.
- Flexible Availability Zone placement of nodes and clusters.
Amazon ElastiCache provides two caching engines, Memcached and Redis. You can move your existing Memcached or Redis caching implementation to Amazon ElastiCache effortlessly. Simply change the Memcached/Redis endpoints in your application.
For AWS, you must create an SSL tunnel to an EC2 instance. It will then redirect your localhost to the caching engine port in AWS.
In the AWS console, for Redis and Memcached, create the cache, and then enter the details in the Caching details page of the ColdFusion Administrator.
登录到您的帐户