Marketora

Technical & Integration Support

वेबहुक और कैश क्लियरिंग (Next.js और Frappe)

ऑन-डिमांड ISR को समझना

Marketora पारंपरिक स्टैटिक साइट जनरेटर के धीमे पुनर्निर्माण चक्रों से बचने के लिए Next.js On-Demand ISR (इंक्रीमेंटल स्टैटिक रीजेनरेशन) के साथ Frappe डॉक्यूमेंट इवेंट हुक्स.

रिवैलिडेशन लूप कैसे काम करता है

  1. Frappe doc_events: Whenever a content document (e.g., MK Help Article or MK Blog Post) is created, updated, or trashed, Frappe triggers marketora_cms.revalidate.on_content_change.
  2. टैग रिज़ॉल्यूशन: The CMS calls doc.revalidation_tags() to gather the precise cache tags affected. For an article with slug welcome-to-marketora, the tags include help-article:welcome-to-marketora and help-articles.
  3. सुरक्षित POST वेबहुक: Frappe sends a POST request to your Next.js application at /api/revalidate containing the tags and the shared secret:
  4. {
      "secret": "YOUR_REVALIDATE_SECRET",
      "tags": ["help-article:welcome-to-marketora", "help-articles"]
    }
  5. समय-सुरक्षित सत्यापन: Next.js verifies the secret using a timing-safe equality check, calls revalidateTag(tag) for each tag, and confirms revalidation with HTTP 200.

कैश समस्याओं की डीबगिंग

अगर अपडेट तुरंत न दिखें, तो जाँच लें कि:

  • The marketing_url and revalidate_secret keys are present in site_config.json on your Frappe bench.
  • The Next.js environment has the matching REVALIDATE_SECRET variable set.
We use first-party analytics to improve Marketora, and Google Analytics to understand site traffic. Nothing loads until you accept.