Two of the most underused libraries are LogBox and CacheBox. The biggest feature they offer is abstraction. You can decouple your app's code from a specific logging or caching mechanism so you can change it out in the future with no big changes to your app. LogBox and CacheBox come bundled with ColdBox but can also be used directly in a legacy codebase as well. In this session we'll demystify some of the basic settings and usage of these powerful libraries to get you up and running and familiar with some of the many options they come with.
4. What is CachBox?
CacheBox is an enterprise caching engine,
aggregator, and API for ColdFusion applications.
5. Where can it be used?
It is part of the ColdBox Platform but it can also
function on its own as a standalone framework.
6. What is a Cache Aggregator?
● Ability to aggregate different caching engines
● Ability to aggregate different configurations of
the same caches
● Consistent API for all caches
● Swap out backend caching implementation
8. Features
● No need to create it, configure it or manage it if
used within a ColdBox Application
● Multi-Threaded
● Based on Java Concurrency Classes
● Memory Management & Memory Sensitive caching
based on Java Soft References
● Multiple Eviction Policies: LRU, LFU and FIFO
● High Load Tested
● Fully Documented
9. Highly Configurable
● JVM Threshold Checks
● Object count limits
● Objects time based expirations
● Purging based on object usage (Access Timeouts)
11. What Caches are Supported?
● CF Provider (EHCache)
● Lucee Provider
● In-memory Provider (CacheBox)
● Couchbase
● Redis
● Memcached
● Disk Store
● DB Store (JDBC)
16. What is LogBox?
● LogBox is an enterprise ColdFusion logging
library
● Inspired by Log4J (A Java logger made by
Apache)
● LogBox is part of ColdBox or can be used as
a stand-alone logging library.
18. Where Do I Use It?
Log messages can come from anywhere
in your application.
● Logs from the framework (coldbox.system)
● Specific component
(com.example.order.orderService)
● Package (com.example.security)
● Ad-hoc locations (“nightly-scheduled-task”)
19. Where Do The Messages Go?
● Files (async)
● Emails
● Databases
● BuglogHQ
● Sentry
● Rollbar
● Raygun.io
● Slack
● Pingdom
20. Custom Logging Levels
● Turn debugging of certain services on only
when you need it (WireBox debugging)
● Log information or debug messages only
on dev server, but not in production
● Only store logs from certain parts of your
framework