glasgowcompbio / ms2ldaviz

Substructural discovery in untargeted metabolomics data using LDA topic modelling.
http://ms2lda.org
MIT License
11 stars 8 forks source link

MotifDB - caching motifdb sets #154

Closed justinjjvanderhooft closed 5 years ago

justinjjvanderhooft commented 5 years ago

Can we cache the url endpoint for the motifdb on our end rather than the caching at GNPS? If not, a small proxy layer could be a solution but not preferable in view of maintenance.

joewandy commented 5 years ago

will look into caching stuff soon ..

joewandy commented 5 years ago

Done. The following 4 views are cached (in memory, using memcached).

    url(r'^list_motifsets/$',views.list_motifsets,name = 'list_motifsets'),
    url(r'^get_motifset/(?P<motifset_id>\w+)/$', views.get_motifset,name='get_motifset'),
    url(r'^get_motifset/$', views.get_motifset_post,name='get_motifset_post'),
    url(r'^get_motifset_metadata/(?P<motifset_id>\w+)/$', views.get_motifset_metadata,name='get_motifset_metadata'),

DEFAULT_CACHE_TIMEOUT used is 60 60 24