I'm not satisfied with Actrix, return my code connected with ntex and also you broke statistics definitions, although my old code worked. Anyway, I'll try to fix them.

error: expected identifier, found keyword `type`
   --> src/main.rs:121:5
    |
121 |     type = "TimedSizedCache<String, String>",
    |     ^^^^
error[E0433]: failed to resolve: use of undeclared type `LanguageCache`
   --> src/main.rs:136:48
    |
136 |     let lang_code = if let Some(cached_lang) = LanguageCache::cache_get(text) {
    |                                                ^^^^^^^^^^^^^ use of undeclared type `LanguageCache`
error[E0425]: cannot find function `detect_language` in this scope
   --> src/main.rs:144:25
    |
144 |         let lang_code = detect_language(text);
    |                         ^^^^^^^^^^^^^^^ help: a function with a similar name exists: `detect_language_get`
...
158 | async fn detect_language_get(query: Query<DetectQuery>) -> impl Responder {
    | ------------------------------------------------------------------------- similarly named function `detect_language_get` defined here
error[E0433]: failed to resolve: use of undeclared type `LanguageCache`
   --> src/main.rs:187:22
    |
187 |     let cache_size = LanguageCache::size();
    |                      ^^^^^^^^^^^^^ use of undeclared type `LanguageCache`
error[E0599]: no method named `global_cpu_info` found for struct `sysinfo::System` in the current scope
  --> src/main.rs:80:28
   |
80 |                 model: sys.global_cpu_info().brand().to_string(),
   |                            ^^^^^^^^^^^^^^^
   |
help: there is a method `global_cpu_usage` with a similar name
   |
80 |                 model: sys.global_cpu_usage().brand().to_string(),
   |                            ~~~~~~~~~~~~~~~~
error[E0599]: no method named `global_cpu_info` found for struct `sysinfo::System` in the current scope
  --> src/main.rs:81:28
   |
81 |                 usage: sys.global_cpu_info().cpu_usage(),
   |                            ^^^^^^^^^^^^^^^
   |
help: there is a method `global_cpu_usage` with a similar name
   |
81 |                 usage: sys.global_cpu_usage().cpu_usage(),
   |                            ~~~~~~~~~~~~~~~~
error[E0599]: no method named `global_cpu_info` found for struct `sysinfo::System` in the current scope
  --> src/main.rs:82:32
   |
82 |                 frequency: sys.global_cpu_info().frequency(),
   |                                ^^^^^^^^^^^^^^^
   |
help: there is a method `global_cpu_usage` with a similar name
   |
82 |                 frequency: sys.global_cpu_usage().frequency(),
   |                                ~~~~~~~~~~~~~~~~
error[E0599]: no method named `uptime` found for struct `sysinfo::System` in the current scope
  --> src/main.rs:87:30
   |
87 |             uptime_secs: sys.uptime(),
   |                          ----^^^^^^--
   |                          |   |
   |                          |   this is an associated function, not a method
   |                          help: use associated function syntax instead: `sysinfo::System::uptime()`
   |
   = note: found the following associated functions; to be used as methods, functions must have a `self` parameter
   = note: the candidate is defined in an impl for the type `sysinfo::System`
error[E0599]: no method named `global_cpu_info` found for struct `sysinfo::System` in the current scope
  --> src/main.rs:98:28
   |
98 |                 model: sys.global_cpu_info().brand().to_string(),
   |                            ^^^^^^^^^^^^^^^
   |
help: there is a method `global_cpu_usage` with a similar name
   |
98 |                 model: sys.global_cpu_usage().brand().to_string(),
   |                            ~~~~~~~~~~~~~~~~
error[E0599]: no method named `global_cpu_info` found for struct `sysinfo::System` in the current scope
  --> src/main.rs:99:28
   |
99 |                 usage: sys.global_cpu_info().cpu_usage(),
   |                            ^^^^^^^^^^^^^^^
   |
help: there is a method `global_cpu_usage` with a similar name
   |
99 |                 usage: sys.global_cpu_usage().cpu_usage(),
   |                            ~~~~~~~~~~~~~~~~
error[E0599]: no method named `global_cpu_info` found for struct `sysinfo::System` in the current scope
   --> src/main.rs:100:32
    |
100 |                 frequency: sys.global_cpu_info().frequency(),
    |                                ^^^^^^^^^^^^^^^
    |
help: there is a method `global_cpu_usage` with a similar name
    |
100 |                 frequency: sys.global_cpu_usage().frequency(),
    |                                ~~~~~~~~~~~~~~~~
error[E0599]: no method named `uptime` found for struct `sysinfo::System` in the current scope