NAME

Langertha::Role::KeepAlive - Role for engines that support keep-alive duration

VERSION

version 0.302

keep_alive

keep_alive => '5m'
keep_alive => '-1'   # keep forever

Controls how long the engine keeps the model loaded in memory after a request. Accepts duration strings such as 5m or -1 (keep forever). When not set, the engine uses its own default.

See also no_keep_alive for explicitly unloading the model after each request.

no_keep_alive

no_keep_alive => 1

When true, the model is unloaded from memory immediately after each request. Equivalent to setting keep_alive => '0' but more explicit.

get_keep_alive

Returns the effective keep-alive value: '0' if no_keep_alive is set, the keep_alive value if provided, or undef if neither is set (letting the engine use its default).

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de> https://raudss.us/

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.