简体   繁体   中英

Azure Translation API - caching

Azure Translation API - Cache - SharePoint

I am building a SPFx extension for our modern SharePoint site that will allow the user to select their preferred language and update the entire page. It makes calls to the Azure Translation API. Based on our quantity of users(100,000+), I need to enable some caching of the translations so the page/webparts doesn't re-translate each time.

Ideas on how I can achieve this?

I'm having the same Situation. I have mutiple sites that i want translated in up to 19 Languages. These include Usercomments, dynamic news and so on. Since every character costs, I was thinking about caching the requests. I'm not that far into the project jet, but i thought about a caching service, that would be based on the Request to the API itself, since i have no control about the frontendpart. In case i have no option to directly cache at the Azure Translate API, i though about a solution, that might work.

System ----> Custom Translate Cache API ----> Azure Translate API

The Custom Translate Cache would always get the first request and the routes would basicly be build identical to the Azure Translate API. Since that would be a simple PHP API or so, the Request could be cached. If the cache for that requests isn't filled, the Azure Translate API is called.

That will be my try. In case by now you found a solution and didn't post it here, i would be happe to here about it.be

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM