fn call(&self) -> usize {
        // Get a list of keys to remove.
        let remove_keys: Vec<_> = global_csrf_map()
            .iter()
            // Filter for expired records
            .filter(|record| record.value().1 < Utc::now())
            .map(|record| record.key().clone())
            .collect();

        // Remove all the records necessary from the global CSRF map.
        // Return the number of keys removed.
        return remove_keys
            .iter()
            .map(|key| global_csrf_map().remove(key))
            .filter(Option::is_some)
            .count();
    }
// Run once every 20 minutes. Return the number of expired
// CSRF tokens removed from the global hashmap.
Run once every 20 minutes. Return the number of expired
CSRF tokens removed from the global hashmap.
Run once every 20 minutes . Return the number of expired CSRF tokens removed from the global hashmap .
fn call(&self) -> usize {
        // Get a list of keys to remove.
        let remove_keys: Vec<_> = global_csrf_map()
            .iter()
            // Filter for expired records
            .filter(|record| record.value().1 < Utc::now())
            .map(|record| record.key().clone())
            .collect();
        // Remove all the records necessary from the global CSRF map.
        // Return the number of keys removed.
        return remove_keys
            .iter()
            .map(|key| global_csrf_map().remove(key))
            .filter(Option::is_some)
            .count();
    }
fn call ( & self ) -> usize { // Get a list of keys to remove. let remove_keys : Vec < _ > = global_csrf_map ( ) . iter ( ) // Filter for expired records . filter ( | record | record . value ( ) . 1 < Utc :: now ( ) ) . map ( | record | record . key ( ) . clone ( ) ) . collect ( ) ; // Remove all the records necessary from the global CSRF map. // Return the number of keys removed. return remove_keys . iter ( ) . map ( | key | global_csrf_map ( ) . remove ( key ) ) . filter ( Option :: is_some ) . count ( ) ; }
Run once every 20 minutes.
Run once every 20 minutes .
&self
&self