Create a new method on your component called getFolderStructure. As mentioned previously, this method needs to accept a single path parameter. This is so we can use with both the current path and children paths:
getFolderStructure(path) { }
This method needs to check the cache and return the data. Make a new variable, titled output, inside the method and return it:
getFolderStructure(path) { let output; return output;}
When caching the data in Chapter 6, Caching the Current Folder Structure Using Vuex, we were using the slug as the key in the store. The slug was generated by using the current path; however, we cannot use this in the new methods as it is fixed to its current location.
Create a new method ...