תרגום - איך ה-caching מטופל? לפי עמוד או לפי נושא/תגובה?

אני בודק את פונקציית התרגום. היא עובדת מדהים מבחינת איכות ומהירות, כך שאנחנו רק צעד אחד מהטמעה באתרים שלנו.

הבעיה היחידה היא שאני קצת מודאג לגבי עלות התרגום הממוחשב.

אם התרגומים נשמרים במטמון, אני חושב שהעלות תהיה הרבה פחותה, אבל עדיין, התרגום השמור במטמון צריך להיות מאוחסן לא לפי ה-html אלא לפי נושא/הערה, אחרת, אם השרשור ממשיך לגדול, התרגום יצטרך לגדול באופן קבוע.

לכן, השאלה שלי היא, כיצד מטופל התרגום השמור במטמון?

Hey there

Translations are stored in tables, not cached per se.

If you have data explorer, you may use a query like such to view the stored translations (there are topic_localizations, post_localizations, category_localizations, replace accordingly).

select * from topic_localizations
limit 10

Discourse uses terms like topics, posts, and such (this might be useful). A topic has a title and has posts. This reply itself is a post. We do not store just one translation per full topic. So for example in this topic we have:

  1. topic translation for the topic title
  2. post translation for your post above
  3. post translation for my post now
  4. (post translation for any subsequent post)

Hope this helps.

2 לייקים