This functionality was introduced in FarCry 6.3.0.
The CDN functionality encompasses many changes. Broadly speaking it is the ability to store and serve "transitory" files (e.g. CSS, images, etc) from somewhere besides the application server. Previously, FarCry's support for this kind of thing has been limited to configuring where on the web server files are stored.
The following use cases should now be supported:
- using local file system, S3, and FTP storage interchangeably
- configuring the 4 broad "types" of FarCry files separately (cache, images, secure files, public files)
- migrating files from an existing location to a new location
These changes introduce the idea of a "location", which is a discrete configuration that is later referred to by name. FarCry core uses five locations (cache, images, privatefiles, publicfiles, archive), and you should consider their access characteristics when you're looking at moving to a CDN - you may decide that some of these locations shouldn't be on a CDN because of security, serving responsiveness or file access speed.
media for archived records
Location | Used For | Access |
---|---|---|
cache | minified JS and CSS | Write once, served immediately, files are never changed, needs to be served quickly |
images | image formtool | Write once or twice (when resizing), read several times as source for different sizes, needs to be served quickly |
privatefiles | file formtool (secured and draft content) | Moved in and out as content is published and unpublished, needs to be able to be served in a controlled fashion |
publicfiles | file formtool (unsecured and approved content) | Moved in and out as content is published and unpublished |
archive | content archives (history) | Write once, rarely read, doesn't need to be served at all |
To change FarCry's default behaviour you would override one (or all) of these in /projects/yourproject/config/_serverSpecificVarsAfterInit.cfm.
For more details on implementing FarCry CDN features: