1

I have a prototype of a custom data provider in Sitecore 9 that will be used to provide items created by an API.

Data is currently fetched in the constructor of the data provider.

Im unclear on a few things: - When the constructor of the data provider is called? Is it when the Database is initialised? - If the data returned by the api may change periodicaly e.g. every few hours, and I want to have control over when we hit the API, would it be best to move the logic to get data from the API to GetItemDefinition and then add the data to a custom cache ? - Is it best to implement scheduled publishing, or publish whenever data is fetched in order to keep web db up to date?

  • 4
    If you want to have control over, when you hit the API, you should probably be looking at the Data Exchange Framework instead. Sync the data to your solution. Data Providers are meant for more of a real time view into a foreign dataset. – Mark Cassidy May 1 '18 at 10:20
  • Thanks. I've gone ahead and used the DEF instead :) – Steve Ward May 11 '18 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.