Cache Providers
Register custom cache providers in your BoxLang module (Java only)
Creating a Cache Provider
import ortus.boxlang.runtime.cache.providers.ICacheProvider;
import ortus.boxlang.runtime.scopes.Key;
public class MyCacheProvider implements ICacheProvider {
@Override
public Key getName() {
return Key.of( "MyCache" );
}
@Override
public void configure( IStruct config ) {
// Configure provider from settings
}
@Override
public Object get( Key key ) {
// Retrieve from your cache
}
@Override
public void put( Key key, Object value, Long timeout ) {
// Store in your cache
}
@Override
public void clear( Key key ) {
// Remove from your cache
}
// ... other ICacheProvider methods
}Usage
Next Steps
Last updated
Was this helpful?
