Blyx Nest Blyx language
Registry / Library
library · v0.1.0

StaleWindow

Classify a cache entry under an explicit stale-serving policy.

Source repository · Package JSON

Use StaleWindow

use vendor::stalewindow::stalewindow;

Run the example

nest demo stalewindow@0.1.0
blyxc native-run stalewindow-demo/main.blyx
Example source and expected output
use vendor::stalewindow::stalewindow;

fn main() {
    let age = 11.0;
    let lifetime = 10.0;
    let grace = 4.0;
    let mandatory = 0.0;
    let result = stalewindow_classify(age, lifetime, grace, mandatory);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

1
3

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP1d649b9186759a9ca5dcfddf987510054e297902664d0050467fe35b32dfcc74b9ee5f1071