Razuna Cache Configuration
As of Razuna 1.5, we introduced different caching options. Caching can make a huge performance difference to your application by reducing the overhead associated with producing repeated blocks of functionality. Using a cache inside of Razuna is extremely easy, allowing you a wide variety of ways to not only access the cache, but how you manage and store this cache using both memory, disk, Memcached, MongoDB and CouchBase.
By default, Razuna uses caching already within the “Memory” and “Disk” configuration. You only need to change this if you want to use another caching mechanism like Memcached, MongoDB or CouchBase!
Changed the default cache configuration is fairly simply. All you need to do is to edit the file “Server.cfc” (located in the WEB-INF folder). Within that file use one of the below configuration options (they should already be in there commented).
This cache uses a remote memcached (or CouchBase) server as its storage mechanism. The size of this cache is controlled by the server, with items being auto-aged to make room for new items.
server is the list of one or more memcached servers that the cache will connect to.
waittimeseconds is the time that Razuna will wait for before cancelling the operation to the server.
If all the servers go away, then the system will operate as normal, except the cache will simply return nothing.
Using a MongoDB as a caching server is an effective use of this powerful remote document store. Razuna utilises the MongoDB architecture as efficiently as possible, ensuring the minimum overhead is placed in the cache management.
server is the list of MongoDB servers that will be used. This is designed to utilise replica shards.
db is the name of the database, which defaults to ‘razcache’.
collection is the name of the collection to use, which defaults to the name of the cache region when created.
user if the remote MongoDB is protected by a username/password, this is the username.
password password if protected
You need to restart the Razuna server in order to apply the change!