Directive là gì?

Noun None
preprocessor directive
Chỉ thị

Ví dụ các chỉ thị tiền xử lý (preprocessor directive) trong ngôn ngữ lập trình C/C++ như #include, #define,... Bên dưới là code ví dụ về chỉ thị (directive) #include trong ngôn ngữ C.


/* Example using #include directive */
#include <stdio.h>

int main()
{
   /*
    * Output "Dictionary4it began in 2022" using the C standard library printf function
    * defined in the stdio.h header file
    */
    printf("Dictionary4it began in %d\n", 2022);

    return 0;
}

Noun Web
instruction
Chỉ thị

Ví dụ cache-control gồm các chỉ thị (directive) trong cả yêu cầu (request) và phản hồi (response). Ví dụ các chỉ thị yêu cầu (request directive) như no-cache, no-store, max-age. Các chỉ thị phản hồi như no-cache, must-revalidate, proxy-revalidate, v.v. Bên dưới là ví dụ về chỉ thị phản hồi max-age:

Cache-Control: max-age=604800

Chỉ thị phản hồi max-age = N chỉ ra rằng phản hồi vẫn mới cho đến N giây sau khi phản hồi được tạo. Cho biết rằng cache có thể lưu trữ phản hồi này và sử dụng lại nó cho các yêu cầu tiếp theo khi nó mới.

Learning English Everyday