Giter Site home page Giter Site logo

Cache Date in return about sleekdb HOT 11 CLOSED

stickypages avatar stickypages commented on May 18, 2024
Cache Date in return

from sleekdb.

Comments (11)

rakibtg avatar rakibtg commented on May 18, 2024

@stickypages We can use something like filemtime.

filemtime — Gets file modification time

Can I know about your use case?

from sleekdb.

stickypages avatar stickypages commented on May 18, 2024

Yeah but I don't know which file it is... More so to display a date that says, "last updated". Does that help?

from sleekdb.

rakibtg avatar rakibtg commented on May 18, 2024

@stickypages I think you can add a custom property in your document like "updatedAt" and update the datetime manually. The cache files are not predictable and you will not get a proper datetime on the purpose of showing "last updated".

from sleekdb.

stickypages avatar stickypages commented on May 18, 2024

Yeah but I don't know which file to require est to get the datetime

from sleekdb.

Timu57 avatar Timu57 commented on May 18, 2024

@stickypages are you searching for something like this? #47

from sleekdb.

stickypages avatar stickypages commented on May 18, 2024

No, just want to know the date when the cache was last updated. Basically the file timestamp but I can't call on the file because I don't know which file to check, there are tons of files.

from sleekdb.

Timu57 avatar Timu57 commented on May 18, 2024

Ok, can you please tell us your use case? For what do you need the timestamp of cached files? We need to know that, to build/ provide a good method for you.

Thank you

from sleekdb.

stickypages avatar stickypages commented on May 18, 2024

Yeah, like I was mentioning. it's nice to know when a cache file was updated.
Example: Am I receiving fresh data, or cached data. I don't have a way to know. Also, it's nice to know when the latest file was updated so I can reference it.

from sleekdb.

Timu57 avatar Timu57 commented on May 18, 2024

@stickypages I think I get what you are trying to achieve with the date of the cached file.

Instead of giving the date and letting the user handle the caching by its own we probably should optimize/ redo the caching system to consider updated content.

I will make a new issue for that.

from sleekdb.

Timu57 avatar Timu57 commented on May 18, 2024

#62 Hope this could help you.

from sleekdb.

rakibtg avatar rakibtg commented on May 18, 2024

I will close this issue, feel free to re-open!

from sleekdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.