trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shu Kit Chan <chanshu...@gmail.com>
Subject Re: Is it possible to disable luajit code cache?
Date Sat, 02 Mar 2019 06:43:57 GMT
I think you need to do this obviously for development purpose. Right?

If you are writing your lua script for the remap rules , you can do
"traffic_ctl config reload" to reload the script without restarting
your server / container
- https://docs.trafficserver.apache.org/en/latest/appendices/command-line/traffic_ctl.en.html#cmdoption-traffic-ctl-config-arg-reload

Another way I can imagine is to package your code in a function in a
module. And call that function inside do_remap()
And just before calling the function you can do something like this.

function do_remap()
  package.loaded.my_module = nil;
  local my_module = require 'my_module'
  my_module.execute()
end

Honestly I have not tried this before and don't know if it will work
or not. Please do give it a try.

Thanks.

Kit

On Fri, Mar 1, 2019 at 9:37 PM Eric Chaves <eric@uolet.com> wrote:
>
> Hi fellows, thanks for all the support this community has gave me so far. With your help
I'm now diving-in on how to write some simple lua plugins.
>
> To aid in my development I'm running ATS in a docker container using docker-compose however
I'm still needing to restart my containers every time I change my plugin code due to luajit
caching the compiled code.
>
> Is it possible to disable luajit caching forcing ats to recompile the lua code on each
request?
>
> Thanks!
>
> Best regards

Mime
View raw message