ColdBox's URL Actions
ColdBox has some URL actions that will be very useful when coding and using the framework. Below is a quick table listing and below are the full descriptions
Quick URL Actions Table
| URL Action | Value | Description |
| fwreinit | string | Reinitialize the framework and all its variables. If a password is set in the config, place the password here |
| fwCache | any | Override a cached event so it can be purged and re-cached. The framework just detects that the URL action exists |
| debugmode | boolean | Make your current session go into/out of debugging mode. |
| debugpass | string | If DebugPassword setting used, then place here. |
| dumpvar | list | A comma delimited list of variables to dump. |
| debugpanel | string | The debug panel monitor to render. |
Expanded Descriptions
fwreinit
The most useful url action you will ever use. This action will reload the framework to a new state. It will re-initialize the configuration structures, clean the cache, and give you a fresh start. You can also password protect this URL action by filling out the ReinitPassword setting in the coldbox.xml. (Look at Config Guide)
- No ReinitPassword setting.
index.cfm?fwreinit=1 index.cfm?fwreinit=true
- UsingReinitPassword setting, lets pretend the password is "yea"
index.cfm?fwreinit=yea
fwCache
This flag is used to override a cached event so it can be purged and re-cached by the framework. The framework just detects that the URL action exists, so it can be equals to anything.
index.cfm?event=blog.dspBlog&fwCache=true
debugmode & debugpass
This url action is used in order for the user to go into or out of ColdBox debug mode. Debug mode, means that a debugging panel will be rendered at the end of the requested page output. This is a very convenient way to test in production environments or while development. You can set the initial debug mode for an application via the coldbox.xml file. (Look at Config Guide) In order for this action to work correctly, it must determine if the application has a DebugPassword attached to it, also via the coldbox.xml. If the DebugPassword is blank, then this action works on its own.
The debug cookie expires when the user closes the browser, that is, the cookie is a vapor cookie.
Look at the samples below.
- DebugPassword set to blank.
index.cfm?debugmode=true index.cfm?debugmode=1
- Using DebugPassword setting, lets pretend the password is "yea"
index.cfm?debugmode=yea&debugpass=yea
dumpvar
This URL action is used as a utility to dump variables in the debugging panel. Therefore, you need to be in debug mode in order to use it. Look at section above. You can send a single variable name or a list and it will be dumped in the DumpVar section of the debugging panel.
You can also disable this utility action via the coldbox.xml (Look at Config Guide)
- Single Variable Dump
index.cfm?dumpvar=session index.cfm?dumpvar=myvariable
- Variable List
index.cfm?dumpvar=session,application,request
debugpanel
The debugpanel url action can ONLY BE used when in debug mode. If you are not in debug mode, then the panel will not be rendered. The available panels are:
- cache : This will render the cache panel monitor
- profiler : The execution profiler monitor
- cacheviewer : The cache viewer dumper. Need the key element too dump.
More panel monitors will be added as development continues.
index.cfm?debugpanel=cache
index.cfm?debugpanel=profiler
index.cfm?debugpanel=cacheviewer&key=mycachekey
Here is a screenshot of the latest Cache Monitor & the Execution Profiler:
Cache Panel Commands
The cache content panel has some very useful commands. This will help you issue commands to the cache when you are in debug mode and ONLY in debug mode.
- Clear cache entries
- View cache entries
- Clear all cached events
- Clear all cached views
- Expire all objects
