• Works well. ??

    The PHP functionality is super-useful and intuitive; I used it in my own shortcode so that I could easily format the output the way I wanted.

    The caching seems to work well, and is a clever way of avoiding having to requery IMDB on every load, while also avoiding cluttering the database with extra tables. There are situations where one may wish to have the IMDB data saved into their database, but there are also situations where that is overkill, and this plugin is great for those.

    Overall this does everything that I want at the moment! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author thaikolja

    (@thaikolja)

    Thanks for your kind words. Implementing an option to switch between file caching and database caching (the movie details at least) sounds like a good idea. I think I’m going to implement that in the next version. Thanks for that!

    Thread Starter grapepress

    (@grapepress)

    You’re welcome man! ??

    Regarding being able to switch between file caching and database caching: That would definitely be cool! Since it seems that you’re interested I’ll add some more thoughts/suggestions about that.

    In my case the main advantages to having the data in the database would be then being able to filter and sort off the various values. The fields I’d personally be interested in filtering and/or sorting by are: Title, Year, Runtime and Genres.

    I’d also suggest that when adding the db functionality you make any of the array based fields each into a custom taxonomy so that we can work with that data like we would tags/categories. In my case I’m only concerned about Genres, but things like Actors and Directors would be logical fields to make into their own taxonomies as well.

    Having said all that, I’m actually pretty content with the current functionality. I can display all my items on one page and then filter and sort via Javascript. It’s really only down the road when the list gets long enough to warrant splitting it into multiple pages that then being able to filter/sort off of database data would be helpful.

    Those are my thoughts for the moment. I’ll let you know if I think of anything else! ??

    Plugin Author thaikolja

    (@thaikolja)

    Thanks for your ideas. I’ve now implemented an option that lets you decide whether the cache is being stored in the database or locally on the server. However, I’ve decided not to store it in SQL tables but in WordPress’ get_option() environment. This won’t allow you to filter them, but I prefer this way as it is a lot easier to manage.

    Thread Starter grapepress

    (@grapepress)

    Wow, that’s awesome–you jumped on that quickly! ??

    I’m curious: since one can’t filter (or sort either, I assume) on the data when it is stored in the get_option() environment, what would be the pros and cons of storing the data in files vs in the database in that way? For example, would there be a performance difference between the two methods? Other differences?

    Regardless, thanks for adding this feature! ?? Also, I’m appreciating the improvements to “runtime” as well!

    Plugin Author thaikolja

    (@thaikolja)

    Saving your cache inside a database is always better than static files because reading a file means – compared to reading a database entry – more resource power from the CPU and harddisk.

    By the way, you can sort the output if you’ve chosen database caching. See here:

    https://www.w3schools.com/php/php_arrays_sort.asp

    Thread Starter grapepress

    (@grapepress)

    Yeah, that makes sense (regarding performance)–I would figure that would be the case as file reads can be expensive, but I appreciate hearing your response as there’s always exceptions that I’m not aware of.

    Regarding the sorting: Thanks for that! I was aware of that, but I don’t think it would work for how I was meaning (which I wasn’t clear about). In my case I plan to have one IMDB item (eg, movie) per post, and I’ll be adding some non-IMDB tags to each movie (probably in the form of a custom taxonomy). So I think the array sort stuff would only be useful for me if I was getting all of my IMDB movies all in a single plugin call (which I could then sort the results of that array); but I’d then lose the ability to easily add my additional tags to each movie.

    Am I perhaps missing something though?

    Regardless, like I said earlier, I don’t see it being an issue for a long time as I’m thinking I will just do my sorting and filtering via JS anyway (and only worry about doing it differently when I have so many entries all on one page as to be problematic for performance. My current plan is to just display the movie title (and year) for each, and then load the additional movie details via ajax on clicking the movie title. I can have additional data attached to the movie title element (as either class names or data-attributes) that I should be able to then sort/filter on via JS.
    ??

    Plugin Author thaikolja

    (@thaikolja)

    I’m going to add some additional parameters to the main functions that let you set more speciospecifically the order of the result.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Excellent!’ is closed to new replies.