Persistently store package data


#1

In my package I need to store some data models.

Some suggestions for storing data which I’ve seen on this site are:

  • IndexedDb
  • WebSql
  • LocalStorage

The problem is that the data using these approaches isn’t very persistent and can be removed quite easily.
So what are the go-to choices for storing data generated by packages?


#2

I’m not sure what you mean by this. Are you looking for data that can’t ever be deleted?


#3

More like data that can only be deleted consciously, and not as a result of expiry.


#4

You can always write to a file in the ~/.atom directory. There are a few packages, including one of mine, that uses this technique.


#5

Wasn’t aware I could do that. Thanks!