githubEdit

1.0.0-Beta3

June 28, 2024

BoxLang Betas are released weekly. This is our third beta marker. Here are the release notes.

New Features

BL-256arrow-up-right Implement query cache ability

Thanks to our enterprise cache engine and aggregator built into BoxLang, you can now use it to cache queries via its options configuration structure using cfquery or queryExecute. Here are the query caching properties you can use:

  • cache:boolean - To turn on caching, this must be true. The default is false

  • cacheTimeout:timespan - Optional timeout of the query in the cache. By default, is uses whatever the default timeout of items the cache has been configured with.

  • cacheLastAcccessTimeout:timespan - Optional last access or idle timeout of the query in the cache. By default, is uses whatever the default timeout of items the cache has been configured with. This means that if this query is NOT used or requested in this timespan, it will be marked for eviction.

  • cacheProvider:string - The name of the cache provider to store the queries. By default, we use the DEFAULT cache in BoxLang.

queryExecute(
    "SELECT * FROM developers WHERE role = ?",
    [ "Developer" ],
    { cache: true }
);

By default, queries will use the default Boxlang CacheProviderarrow-up-right, which has default timeouts and lastAccessTimeout values set.

To specify a custom caching provider, you can use the cacheProvider query option:

queryExecute(
    "SELECT * FROM developers WHERE role = ?",
    [ "Developer" ],
    { cache: true, cacheProvider : "redis" }
);

To specify custom cache entry timeouts, use cacheTimeout or cacheLastAccessTimeout:

circle-exclamation

Metadata

All query metadata will also have the cache information available to you as well. So you if get dump the query metadata you will see a ton of debugging information about the query:

Interacting With The Cache

Please note that this leverages the BoxLang cache. This means you have full access to the cache provider and you can interrogate it for queries, clear all of them, or clear one of them. The default prefix used for all cached queries is: BL_QUERY

BL-261arrow-up-right coerce java SAMs from BoxLang function interfaces

This is another major milestone in the Java interop features of BoxLang. This allows us to coerce any BoxLang Lambda/Closure/UDF or even Classes to ANY, yes, ANY Java Functional Interface or Java SAM (Single Abstract Method Interface).

BL-281arrow-up-right AsyncService support for Virtual Thread Executors (create/manage)

Virtual Threads are now available to BoxLang via executors. You can choose the new VIRTUAL executor for schedulers or when creating schedulers via our AsyncService. This will treat all tasks and schedules to use virtual threads.

More entry points to access this executor will be provided in the coming betas, alongside our very own runAsync() and the ability to create virtual threads as well.

BL-284arrow-up-right Bifs for module info: getModuleList() getModuleInfo( module )

As more modules are being developed for BoxLang, you now have the ability to know which modules have been loaded and activated in the language. As well as specific information about a module if needed. This is great for inter-dependencies and checking if modules have loaded from BoxLang.

BL-285arrow-up-right Dumping of Java Classes now includes a dump of the `toString()` value to visualize values better

This is a developer eye-candy, so when you dump any Java class, you can actually see the value of the class instance data via the toString() method.

BL-289arrow-up-right New dump template for BL Functions

The dumping of BoxLang Functions (Closures, Lambdas, UDFs), either standalone or from a class, has great visibility now. You can see even the class used to generate the function, the function annotations, and much more.

BL-292arrow-up-right Allow the createDynamicProxy bif to support the request class loader so it can load classes from loaded libraries in the application.bx, runtime and more.

If you use createDynamicProxy() to make a BoxLang class look like a Java class, you can continue to do so now, but it accounts for all class loaders in the application. If you come from a CFML engine, this is impossible and is always a pain and limitation.

In BoxLang, your context matters. So depending on where you create the dynamic proxy, it will account for the surrounding class loaders to be able to create the appropriate Java proxies.

BL-298arrow-up-right New Script Binaries for bxCFTranspiler, bxCompiler, bxFeatureAudit tools in the distribution bin folder

We have introduced Windows and Mac/Linux binaries for running several CLI tools. You no longer need to refer to the docs with extra-long options. You can now use the provided binaries to call the appropriate CLI tool.

If you use the quick installer, all these binaries will be installed for you.

Improvements

BL-254arrow-up-right Refactor JDBC connection retrieval out of the QueryOptions class

BL-280arrow-up-right Dynamic method matching discovery algorithms updated to do 2 pass algorithm: exact, loose coercion matching

BL-283arrow-up-right Improvement of cache service and cache provider methods for easier boxlang interactions

BL-290arrow-up-right Refactored the dump css to `resources/dump/html/Dump.css`

BL-291arrow-up-right Migrate dynamic proxies to native java implementation from the JDK

BL-296arrow-up-right passing the session id to the onsessionstart listener

BL-297arrow-up-right Give better warnings if the sessionStorage is not a valid string

Bug

BL-198arrow-up-right attributecollection not handled properly on cfthrow

BL-278arrow-up-right Left in system out calls that need to be removed

BL-279arrow-up-right JSR ScriptEngine starting runtime without debug flag if passed

BL-282arrow-up-right Creating a default cache was not setting the right name and a "default" already registered exception was being thrown

BL-286arrow-up-right Default argument values not always checked for type

BL-287arrow-up-right Implements missing from Box Class metadata

BL-288arrow-up-right Static Scope missing from metadata

Last updated

Was this helpful?