FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

Ortus MongoDB Cache

v1.1.1+2600 Public

Ortus MongoDB Extension

The Ortus MongoDB Extension is a native Lucee Extension that allows your CFML server to connect to a Mongo server/cluster and leverage it for built-in caching, session storage, and NoSQL document storage.

MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era. MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time. MongoDB is free to use. Versions released prior to October 16, 2018 are published under the AGPL. All versions released after October 16, 2018, including patch fixes for prior versions, are published under the Server Side Public License (SSPL) v1. Learn More

Requirements

  • Lucee 5.1.0 and above
  • Mongo 4.0.X and above

Features In A Nutshell

  • Add Mongo native functionality to any Lucee server
  • Install at server level (Available to all contexts)
  • Create Cache connections in the Lucee web administrator or via Application.cfc to connect to any network-accessable Mongo cluster
  • Set and get objects from Mongo via standard CFML functions and tags (cachePut(), cacheGet(), cfcache action="get|put")
  • Fully supports all built-in Lucee cache functions including wildcard filters
  • Seamlessly distribute storage of the following to any Mongo Cluster ** Lucee session storage ** Lucee client storage ** Lucee Ram resouces (ram://...)
  • Seamlessly cache the following to any timeout-sensitive Mongo key ** Results of database queries ** Results of deterministic functions ** Complex or simple objects in your application's code ** Cached templates (cfcache action="content|cache|serverCache")
  • Extremely lightweight and fast
  • Native Mongo functions: MongoGetConnection( cacheName ), MongoGetProvider( cacheName )

Development Environment Setup

Initialize the cluster:

A Docker compose file has been set up to allow for testing the extension within a cluster of MongoDB servers. To intialize the environment for the first time, run docker-compose up -d --build

Once the containers have been built and initialized, you will need to run the following command to initialize the MongoDB cluster:

docker exec -it ortus-mongodb-lucee-extension_mongodb_1  mongo --eval 'rs.initiate({ _id: "extension_test", members: [{ _id: 1, host: "mongodb:27017" }, { _id: 2, host: "mongo-repl1:27017" }, { _id: 3, host: "mongo-repl2:27017" }], settings: { getLastErrorDefaults: { w: "majority", wtimeout: 30000 }}})'

Note: if you have cloned the repo in to a custom named directory ( e.g. named mongodb instead of ortus-mongodb-lucee-extension ), you will need to change that to your local directory name in the command above

Once the cluster is intialized you may build and deploy the extension and test by accessing http://127.0.0.1:61656/tests/runner.cfm

Dependencies (0)


Dev Dependencies (0)


Changelog

1.1.1

  • Adds cluster capabilities via a delimited list of hosts. A delimited list of ports or a single port may be provided

1.1.0

  • Adds compatibility for versions of Lucee greater than 5.2.9

1.0.0

  • First Version

 

  •   Ortus Solutions
  • Published
  • 1.1.1+2600 is the latest of 6 release(s)
    Published
  • Published on Feb 11 2020 10:01 AM
Add https://forgebox.io to the Lucee Admin
No collaborators yet.
   
  • Aug 29 2019 04:12 PM
  • Feb 11 2020 10:01 AM
  • 450
  • 561
  • 8,827