Updated on 2026-04-24 GMT+08:00

Function Stages

A function stage indicates when a function takes effect. The priority of function configurations in CDN and FunctionGraph vary in different stages.
  • Client request received, Before caching origin content, and Before response to client: Functions are executed in FunctionGraph first and then configured by CDN, so CDN configuration takes effect.
  • Before origin pull: Functions are configured by CDN first and then executed in FunctionGraph, so FunctionGraph configuration takes effect.
Table 1 Function stages

Stage

Description

Client request received

After a client initiates a request but before a CDN PoP receives the request. Example: URL rewrite

Before origin pull

After a CDN PoP receives a request for uncached content but before it pulls content from the origin server. Example: origin URL rewrite

Before caching origin content

Before response to client

After the origin server sends a response to a CDN PoP but before the PoP caches the content. Example: cache rules

Before a CDN PoP sends a response to a client. Example: browser cache TTL